This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 2/3] frame: use get_prev_frame_always in skip_tailcall_frames
- From: Pedro Alves <palves at redhat dot com>
- To: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>, Joel Brobecker <brobecker at adacore dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 09 Feb 2016 14:41:20 +0000
- Subject: Re: [PATCH v2 2/3] frame: use get_prev_frame_always in skip_tailcall_frames
- Authentication-results: sourceware.org; auth=none
- References: <1454681922-2228-1-git-send-email-markus dot t dot metzger at intel dot com> <1454681922-2228-2-git-send-email-markus dot t dot metzger at intel dot com> <20160207130057 dot GE20874 at adacore dot com> <A78C989F6D9628469189715575E55B233325F370 at IRSMSX104 dot ger dot corp dot intel dot com> <56B9D08F dot 6060507 at redhat dot com> <20160209115819 dot GH15342 at adacore dot com> <A78C989F6D9628469189715575E55B233325FBEB at IRSMSX104 dot ger dot corp dot intel dot com>
On 02/09/2016 02:25 PM, Metzger, Markus T wrote:
> I'm beginning to wonder if not all-but-the-backtrace-command-related
> get_prev_frame calls should really be calling get_prev_frame_always.
>
> The _always extension isn't very intuitive, though, given that this should be
> the standard function to use. Should get_prev_frame maybe be renamed to
> something like get_prev_frame_within_limit and get_prev_frame_always
> to get_prev_frame?
Maybe a good idea. See also:
https://sourceware.org/bugzilla/show_bug.cgi?id=15558
I just noticed/remembered something -- the check for backtracing past
main and the entry point is in get_prev_frame, get_prev_frame_always
bypasses it.
This means that with your change, I think gdb now allows "finish" in
"main" or in "_start".
Maybe not a bad change, but I though it'd call it out explicitly.
Thanks,
Pedro Alves