[PATCHv2 2/3] gdb: Unify two copies of restore_selected_frame

Andrew Burgess andrew.burgess@embecosm.com
Wed Apr 29 09:17:25 GMT 2020


* Aktemur, Tankut Baris <tankut.baris.aktemur@intel.com> [2020-04-28 15:43:32 +0000]:

> On Tuesday, April 28, 2020 12:04 AM, Andrew Burgess wrote:
> > diff --git a/gdb/frame.c b/gdb/frame.c
> > index ac1016b083f..7cbd03e1721 100644
> > --- a/gdb/frame.c
> > +++ b/gdb/frame.c
> > @@ -2910,6 +2910,67 @@ frame_prepare_for_sniffer (struct frame_info *frame,
> >    frame->unwind = unwind;
> >  }
> > 
> > +/* See frame.h.  */
> > +
> > +void
> > +restore_selected_frame (struct frame_id a_frame_id, int frame_level)
> > +{
> > +  struct frame_info *frame;
> > +  int count;
> 
> Could the 'struct' keyword be omitted and the declarations be moved down to 
> their first definition?  I think this is a general question regarding
> the C to C++ transition and the style in new code.

Thanks for the feedback.  I'll wait to see if there is any other
feedback, but I'll roll both these fixes in to the next revision.

Thanks,
Andrew


> 
> Thanks.
> -Baris
> 
> 
> 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, Gary Kershaw
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Office: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928


More information about the Gdb-patches mailing list