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: Hui Zhu <teawater at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Sun, 21 Apr 2013 17:34:38 +0800
- Subject: Re: [PATCH] not trigger pagination with dprintf
- References: <CANFwon2V2vVADH89czoQjS+F=Uxsc5AgMAsQ3=d0nohc2EfBpA at mail dot gmail dot com> <87zjwuv0qn dot fsf at fleche dot redhat dot com>
On Sat, Apr 20, 2013 at 2:22 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "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.
Will you OK if I update patch to make printf_command call ui_printf
with filter is 0 just with dprintf?
Thanks,
Hui
>
> 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