help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs gdb subproccess ignores printf (stdout isn't flushed ?) on OS X


From: Mike Garey
Subject: emacs gdb subproccess ignores printf (stdout isn't flushed ?) on OS X
Date: Sun, 20 Feb 2005 14:17:16 -0500

I've noticed that when using gdb under the carbon (Apple OS X) version
of GNU Emacs 21.3.50.1, printf statements are not printed until after
the program has terminated, even though the print statements contain a
newline.  I can force them to print by modifying my source and adding
"fflush(NULL);" after each printf statement, but I'd like to find out
how to avoid this.

I compiled this version from the 21.3.50.1 CVS source as of Dec 30th,
2004.  I'm thinking that perhaps I might've missed some compile flag
or something?  Because I've tested with the fink version 21.3.50.1 and
it works without issue, and also with version 21.2.1 which comes with
Panther.  So it's only this self compiled version that's giving me
problems.

I would gladly switch back to a previous carbon version, however,
there's a problem with lisp.el which prevents sexp-selections from
being extended, and it's a feature I need.  This has been addressed by
21.3.50.1, although like I said, gdb printf statements don't produce
immediate output.  So ideally I'd like to find out how to fix this
problem with 21.3.50.1

While we're on the subject of using gdb from within emacs, I'm curious
if there's any way to suppress the following control characters when
using gdb:

^[[0K(gdb) 
^[[2A
^[[0Khello, world!

I've set --annotate=1, and I don't receive any control characters
while single stepping, it's only when printing that I receive the
characters as mentioned above (the ^[[0K and such).  And of course
this doesn't happen with version 21.3.50.1, since I can't even get my
printf lines to show output.

So if anyone has any suggestions, please let me know, I'd really
appreciate it.  Thanks,

Mike

P.S. I'm using GNU gdb 5.3-20030128 (Apple version gdb-330.1) with
Panther (10.3.4) on a G4 iBook 800mhz if that makes any difference.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]