This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH v2 2/3] frame: use get_prev_frame_always in skip_tailcall_frames


> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Pedro Alves
> Sent: Tuesday, February 9, 2016 3:41 PM
> To: Metzger, Markus T <markus.t.metzger@intel.com>; Joel Brobecker
> <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
> Subject: Re: [PATCH v2 2/3] frame: use get_prev_frame_always in
> skip_tailcall_frames
> 
> 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.

There are 46 calls to get_prev_frame ignoring this patch.  Each of them should
maybe be modified to call get_prev_frame_always, instead.  And none of this
is currently covered by the test suite.

The first step would probably be to look at all those calls and derive test cases
for each of them.  Then fix the failing tests one by one.

This is unrelated to this patch series.  Let me therefore drop this patch.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]