This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] not trigger pagination with dprintf
- From: Tom Tromey <tromey at redhat dot com>
- To: Hui Zhu <teawater at gmail dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Fri, 19 Apr 2013 12:22:56 -0600
- Subject: Re: [PATCH] not trigger pagination with dprintf
- References: <CANFwon2V2vVADH89czoQjS+F=Uxsc5AgMAsQ3=d0nohc2EfBpA at mail dot gmail dot com>
>>>>> "Hui" == Hui Zhu <teawater@gmail.com> writes:
Hui> This is the patch for http://sourceware.org/bugzilla/show_bug.cgi?id=15182
Hui> I agree with what Marc said in the bug report.
Quoting for clarity:
a) when pagination is triggered, inferior execution will be
interrupted until the user answers the pagination prompt
b) pagination is triggered by the dprintf but not by real inferior
output. So, as dprintf and inferior printouts appear interleaved
on the screen, the pagination prompt will be triggered when the
dprintfs add up to too many, which will seem random to the user,
since the other printouts are also visible.
I agree these arguments are pretty good, but I don't see why they apply
particularly to dprintf as opposed to all gdb output. But then the
result is to just disable all pagination -- something already easily
done.
So I tend to think this should not go in.
FWIW I have never understood why gdb provides _unfiltered variants of
the print functions. It seems to me that a stream should either be
paginated or not -- having it work at the level of the individual print
means that some prints will provoke paging behavior and some will not;
and, worse, since they are in fact interleaved, the "paging" output may
not all be visible anyhow.
Tom