all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs gdb subproccess ignores printf (stdout isn't flushed ?) on OS X
@ 2005-02-20 19:17 Mike Garey
  2005-02-20 22:51 ` Peter Dyballa
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Garey @ 2005-02-20 19:17 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-02-21  0:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-20 19:17 emacs gdb subproccess ignores printf (stdout isn't flushed ?) on OS X Mike Garey
2005-02-20 22:51 ` Peter Dyballa
2005-02-20 23:08   ` suppressing gdb subprocess control characters? (was Re: emacs gdb subproccess ignores printf (stdout isn't flushed ?) on OS X) Mike Garey
2005-02-21  0:21     ` Peter Dyballa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.