This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Make "bt N" print correct number of frames when using a frame filter
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Tue, 27 Jun 2017 19:37:01 +0100
- Subject: Re: [RFA] Make "bt N" print correct number of frames when using a frame filter
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 88281FEEF0
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 88281FEEF0
- References: <20170423160446.17062-1-tom@tromey.com>
On 04/23/2017 05:04 PM, Tom Tromey wrote:
> PR python/16497 notes that using "bt" with a positive argument prints
> the wrong number of frames when a frame filter is in use. Also, in this
> case, the non-frame-filter path will print a message about "More stack
> frames" when there are more; but this is not done in the frame-filter
> case.
>
> The first problem is that backtrace_command_1 passes the wrong value
> to apply_ext_lang_frame_filter -- that function takes the final
> frame's number as an argument, but backtrace_command_1 passes the
> count, which is off by one.
>
> The solution to the second problem is to have the C stack-printing
> code stop at the correct number of frames and then print the message.
>
> Tested using the buildbot.
Can you expand on the need for the PRINT_MORE_FRAMES flag and
having it based on from_tty? I assume that your first made
the printing unconditional, but then for some reason decided
against it?
Thanks,
Pedro Alves