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: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Joel Brobecker <brobecker at adacore dot com>, Pedro Alves <palves at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 9 Feb 2016 14:25:52 +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>
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Joel Brobecker
> Sent: Tuesday, February 9, 2016 12:58 PM
> To: Pedro Alves <palves@redhat.com>
> Cc: Metzger, Markus T <markus.t.metzger@intel.com>; gdb-
> patches@sourceware.org
> Subject: Re: [PATCH v2 2/3] frame: use get_prev_frame_always in
> skip_tailcall_frames
>
> > > I modified an existing test case to cover the changes. GDB dies
> > > with the modified test and without the changes to
> > > skip_tailcall_frames. This also showed another place where we want to
> use get_prev_frame_always.
> > >
> > > Here's the modified version of this patch:
> >
> > Thanks. Could you do the limiting test in e.g., gdb.base/finish.exp
> > and gdb.base/return.exp, so that it'd be covered on all archs?
>
> I was going to ask the very same :-). The fact that adding your test showed
> we missed a spot raised the question as to how much of the initial patch we
> were testing :).
I don't get your comment.
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?
Regards,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928