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: Phil Muldoon <pmuldoon at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 31 May 2017 16:19:43 +0100
- Subject: Re: [RFA] Make "bt N" print correct number of frames when using a frame filter
- Authentication-results: sourceware.org; auth=none
- References: <20170423160446.17062-1-tom@tromey.com>
On 23/04/17 17:04, 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.
Good catch. Patch LGTM.
Cheers
Phil