This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Out of order display in gdb


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]