[RFA] Make "bt N" print correct number of frames when using a frame filter

Phil Muldoon pmuldoon@redhat.com
Wed May 31 15:19:00 GMT 2017


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



More information about the Gdb-patches mailing list