* Flush ^running
@ 2008-10-04 15:02 Vladimir Prus
2008-10-04 18:16 ` Daniel Jacobowitz
2008-10-06 13:49 ` Marc Khouzam
0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Prus @ 2008-10-04 15:02 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
I've run into a case where gdb would not print ^running in response
to -exec-continue -- at least not during the time frontend is willing
to wait for the response. The problem only happened for my when gdb
is driven by a frontend, not on command line; I don't know what frontend
does differently. I've checked in the below patch to fix this.
- Volodya
[-- Attachment #2: flush.diff --]
[-- Type: text/x-diff, Size: 1022 bytes --]
Index: gdb/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.9872
diff -u -p -r1.9872 ChangeLog
--- gdb/ChangeLog 3 Oct 2008 22:00:09 -0000 1.9872
+++ gdb/ChangeLog 4 Oct 2008 14:56:26 -0000
@@ -1,3 +1,7 @@
+2008-10-04 Vladimir Prus <vladimir@codesourcery.com>
+
+ * mi/mi-interp.c (mi_on_resume): Flush raw_stdout.
+
2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
PR gdb/2384:
Index: gdb/mi/mi-interp.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-interp.c,v
retrieving revision 1.35
diff -u -p -r1.35 mi-interp.c
--- gdb/mi/mi-interp.c 5 Jul 2008 17:57:24 -0000 1.35
+++ gdb/mi/mi-interp.c 4 Oct 2008 14:56:26 -0000
@@ -362,6 +362,7 @@ mi_on_resume (ptid_t ptid)
if (!target_is_async_p ())
fputs_unfiltered ("(gdb) \n", raw_stdout);
}
+ gdb_flush (raw_stdout);
}
extern initialize_file_ftype _initialize_mi_interp; /* -Wmissing-prototypes */
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Flush ^running
2008-10-04 15:02 Flush ^running Vladimir Prus
@ 2008-10-04 18:16 ` Daniel Jacobowitz
2008-10-06 13:49 ` Marc Khouzam
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2008-10-04 18:16 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches
On Sat, Oct 04, 2008 at 07:01:40PM +0400, Vladimir Prus wrote:
>
> I've run into a case where gdb would not print ^running in response
> to -exec-continue -- at least not during the time frontend is willing
> to wait for the response. The problem only happened for my when gdb
> is driven by a frontend, not on command line; I don't know what frontend
> does differently. I've checked in the below patch to fix this.
Try "cat | gdb -i=mi 2>&1 | cat" to reproduce this sort of thing.
If isatty() returns true, most C runtime libraries will put stdout in
unbuffered mode.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Flush ^running
2008-10-04 15:02 Flush ^running Vladimir Prus
2008-10-04 18:16 ` Daniel Jacobowitz
@ 2008-10-06 13:49 ` Marc Khouzam
1 sibling, 0 replies; 3+ messages in thread
From: Marc Khouzam @ 2008-10-06 13:49 UTC (permalink / raw)
To: Vladimir Prus, gdb-patches
Hi,
I've also run into that problem.
When continuing or stepping over a sleep(), I would only see the
^running and *running
after the sleep() call had finished. Just like you , it only happened
when using
the frontend, although is happened with CLI commands from the frontend
(continue, next).
Your patch fixes this issue.
One less thing to worry about.
Thanks!
Marc
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org
> [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Vladimir Prus
> Sent: Saturday, October 04, 2008 11:02 AM
> To: gdb-patches@sources.redhat.com
> Subject: Flush ^running
>
>
> I've run into a case where gdb would not print ^running in response
> to -exec-continue -- at least not during the time frontend is willing
> to wait for the response. The problem only happened for my when gdb
> is driven by a frontend, not on command line; I don't know
> what frontend
> does differently. I've checked in the below patch to fix this.
>
> - Volodya
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-06 13:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-04 15:02 Flush ^running Vladimir Prus
2008-10-04 18:16 ` Daniel Jacobowitz
2008-10-06 13:49 ` Marc Khouzam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox