[PATCH] not trigger pagination with dprintf

Hui Zhu teawater@gmail.com
Mon Apr 22 09:21:00 GMT 2013


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



More information about the Gdb-patches mailing list