* 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; 3+ 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] 3+ messages in thread
* Re: 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, 0 replies; 3+ messages in thread
From: Peter Dyballa @ 2005-02-20 22:51 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 20.02.2005 um 20:17 schrieb Mike Garey:
> 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.
Hello!
Could you check process-connection-type? Is it nil, i.e.communication
via pipes? Then try it with this:
(setq process-connection-type t)
This makes shell work correct too!
--
Greetings
Pete
The mathematician who pursues his studies without clear views of this
matter, must often have the uncomfortable feeling that his paper and
pencil surpass him in intelligence. (Ernst Mach)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-02-22 14:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.814.1108929216.32256.help-gnu-emacs@gnu.org>
2005-02-22 14:46 ` emacs gdb subproccess ignores printf (stdout isn't flushed ?) on OS X Stefan Monnier
2005-02-20 19:17 Mike Garey
2005-02-20 22:51 ` 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.