This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Out of order display in gdb
- From: Tom Tromey <tromey at redhat dot com>
- To: Nagraj <naaaag at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 11 Jan 2009 15:50:31 -0700
- Subject: Re: [PATCH] Out of order display in gdb
- References: <7909b72a0901090938s81d8594p79f5cb9fb0ace066@mail.gmail.com>
- Reply-to: tromey at redhat dot com
>>>>> "Nagraj" == Nagraj <naaaag@gmail.com> writes:
Nagraj> GDB o/p goes out of order with printf , when a '/n' is not present in
Nagraj> the o/p. Problem since a wrap_here("") in
Nagraj> event-top.c:command_line_handler causes the o/p to be buffered and
Nagraj> this problem doesn't show up when a \n is part of the output.
Thanks for the analysis and the patch. Welcome to gdb development :-)
FWIW, I feel that the wrap_here API is odd. It seems like it really
ought to be a method of a particular output stream, but it is not.
I have a couple questions about the patch.
First, could it be fixed in gdb_flush?
Second, does anything rely on this wrap_here call? E.g., it occurred
to me that some command may leave the wrapping in a strange state and
expect this code to reset it.
This patch needs a ChangeLog entry. This is just a generic
requirement for all GDB patches. You can read about how to write them
in the GNU Coding Standards. Also, the gdb CONTRIBUTE file explains a
bit about them.
Finally, did you run the test suite against this patch? You pretty
much have to run the test suite both before and after, to see if there
were any regressions. I recommend saying what testing you did in your
email to gdb-patches, so that everybody can know without asking.
Tom