public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/7900] "printf" output last result
[not found] <bug-7900-4717@http.sourceware.org/bugzilla/>
@ 2022-03-01 23:38 ` tromey at sourceware dot org
0 siblings, 0 replies; 4+ messages in thread
From: tromey at sourceware dot org @ 2022-03-01 23:38 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=7900
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
This was fixed at some point, because I can no longer reproduce it.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug cli/7900] "printf" output last result
[not found] <20021010045802.7900.chuajun@sina.com>
2009-01-09 9:03 ` naaaag at gmail dot com
2009-01-09 11:02 ` naaaag at gmail dot com
@ 2009-01-09 15:56 ` tromey at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: tromey at redhat dot com @ 2009-01-09 15:56 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From tromey at redhat dot com 2009-01-09 15:56 -------
I wonder if there are any commands that leave the wrap string
set to something odd. Perhaps we need a new API to clear the wrap
string.
In any case, I think you could submit this as a patch to gdb-patches.
Here's some info on how:
http://sourceware.org/cgi-bin/cvsweb.cgi/~checkout~/src/gdb/CONTRIBUTE?content-type=text/x-cvsweb-markup&cvsroot=src
--
http://sourceware.org/bugzilla/show_bug.cgi?id=7900
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug cli/7900] "printf" output last result
[not found] <20021010045802.7900.chuajun@sina.com>
2009-01-09 9:03 ` naaaag at gmail dot com
@ 2009-01-09 11:02 ` naaaag at gmail dot com
2009-01-09 15:56 ` tromey at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: naaaag at gmail dot com @ 2009-01-09 11:02 UTC (permalink / raw)
To: gdb-prs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |naaaag at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=7900
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug cli/7900] "printf" output last result
[not found] <20021010045802.7900.chuajun@sina.com>
@ 2009-01-09 9:03 ` naaaag at gmail dot com
2009-01-09 11:02 ` naaaag at gmail dot com
2009-01-09 15:56 ` tromey at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: naaaag at gmail dot com @ 2009-01-09 9:03 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From naaaag at gmail dot com 2009-01-09 09:03 -------
( I am new to gdb development with some debugging + customized debugger dev
experience. Thought of entering this arena with some bug fixes to get to
understand the internals ).
This problem seems to be present in 6.8 too.
(gdb) printf "%x",(int *)main
40055a(gdb) printf "%x",(int *)main
(gdb) printf "%x",(int *)main
40055a(gdb) printf "%d", 9
40055a(gdb) printf "%d", 9
9(gdb)
Problem since a 'wrap_here' present in command_line_handler.
658
659 /* Make sure that all output has been output. Some machines may let
660 you get away with leaving out some of the gdb_flush, but not all. */
===>661 wrap_here("");
662 gdb_flush (gdb_stdout);
663 gdb_flush (gdb_stderr);
As per utils.c :
1536 /* Buffer and start column of buffered text, for doing smarter word-
1537 wrapping. When someone calls wrap_here(), we start buffering output
1538 that comes through fputs_filtered(). If we see a newline, we just
1539 spit it out and forget about the wrap_here(). If we see another
1540 wrap_here(), we spit it out and remember the newer one. If we see
1541 the end of the line, we spit out a newline, the indent, and then
1542 the buffered output. */
Hence this "" is buffered and printing is disabled in fputs* functions due to
wrap_column is set. ( This is not the case , when a o/p ends with \n as
char_printed is 0 ).
And when the next wrap here comes, this buffer is spit out ( hence out of order
printing ).
This wrap_here doesn't seems to be required as it is in command line functions.
(gdb) printf "%x",(int *)main
40055a(gdb) printf "%x",(int *)main
40055a(gdb) printf "%x",(int *)main
40055a(gdb) printf "%d", 9
9(gdb) printf "%d", 9
9(gdb)
--
http://sourceware.org/bugzilla/show_bug.cgi?id=7900
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-01 23:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-7900-4717@http.sourceware.org/bugzilla/>
2022-03-01 23:38 ` [Bug cli/7900] "printf" output last result tromey at sourceware dot org
[not found] <20021010045802.7900.chuajun@sina.com>
2009-01-09 9:03 ` naaaag at gmail dot com
2009-01-09 11:02 ` naaaag at gmail dot com
2009-01-09 15:56 ` tromey at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).