Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevin@buettner.to>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 3/5] Change meaning of VALUE_FRAME_ID; rename to VALUE_NEXT_FRAME_ID
Date: Wed, 16 Nov 2016 19:08:00 -0000	[thread overview]
Message-ID: <20161116120850.5f923597@pinnacle.lan> (raw)
In-Reply-To: <cb05ca92-cd37-ddd2-18bb-081b2377bd3f@redhat.com>

On Wed, 9 Nov 2016 14:48:35 +0000
Pedro Alves <palves@redhat.com> wrote:

> On 11/02/2016 10:19 PM, Kevin Buettner wrote:
> 
> > @@ -2295,7 +2305,10 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
> >    if (ctx.num_pieces > 0)
> >      {
> >        struct piece_closure *c;
> > -      struct frame_id frame_id = get_frame_id (frame);
> > +      struct frame_id frame_id
> > +        = ((frame == NULL)   
> 
> Redundant parens.

Fixed.

> > +	   We use VALUE_FRAME_ID for obtaining the value's frame id instead of
> > +	   VALUE_NEXT_FRAME_ID due to requiring a frame which may be passed  to  
> 
> Spurious space in "passed  to".

Fixed.

> > +	   put_frame_register_bytes() below.  That function will (eventually)
> > +	   perform the any necessary unwind operation by first obtaining the next
> > +	   frame.  */  
> 
> "the any necessary" looks like a typo?

Agreed.  I removed "any " from the comment.

> The comment just below needs updating: it's still phrased in terms
> of get_frame_register_value.  Also, I suspect that renaming the "frame" and
> "frame_id" locals to "next_frame" and "next_frame_id" would allow simplifying
> the new comment.
> 
> >  
> >  	  /* If we get another lazy lval_register value, it means the
> >  	     register is found by reading it from the next frame.

I made the next_frame and next_frame_id changes that you suggested.
Here's the change for the comment:

 	  /* If we get another lazy lval_register value, it means the
-	     register is found by reading it from the next frame.
-	     get_frame_register_value should never return a value with
-	     the frame id pointing to FRAME.  If it does, it means we
+	     register is found by reading it from NEXT_FRAME's next frame.
+	     frame_unwind_register_value should never return a value with
+	     the frame id pointing to NEXT_FRAME.  If it does, it means we
 	     either have two consecutive frames with the same frame id
 	     in the frame chain, or some code is trying to unwind
 	     behind get_prev_frame's back (e.g., a frame unwind

> Otherwise LGTM.

Thanks again for the review.

Pushed.

Kevin


  reply	other threads:[~2016-11-16 19:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 22:11 [PATCH v2 0/5] Prevent more recursion in python based unwinders Kevin Buettner
2016-11-02 22:14 ` [PATCH v2 1/5] Extend test gdb.python/py-recurse-unwind.exp Kevin Buettner
2016-11-09 13:59   ` Pedro Alves
2016-11-16 18:52     ` Kevin Buettner
2016-11-16 22:46       ` Sergio Durigan Junior
2016-11-17 15:27         ` Kevin Buettner
2016-11-02 22:16 ` [PATCH v2 3/5] Distinguish sentinel frame from null frame Kevin Buettner
2016-11-02 22:20   ` Kevin Buettner
2016-11-09 14:48   ` Pedro Alves
2016-11-16 18:54     ` Kevin Buettner
2016-11-02 22:19 ` [PATCH v2 3/5] Change meaning of VALUE_FRAME_ID; rename to VALUE_NEXT_FRAME_ID Kevin Buettner
2016-11-09 14:48   ` Pedro Alves
2016-11-16 19:08     ` Kevin Buettner [this message]
2016-11-02 22:23 ` [PATCH v2 4/5] Make gdb.PendingFrame.read_register handle "user" registers Kevin Buettner
2016-11-16 19:08   ` Kevin Buettner
2016-11-02 22:26 ` [PATCH v2 5/5] Stash frame id of current frame before stashing frame id for previous frame Kevin Buettner
2016-11-09 14:48   ` Pedro Alves
2016-11-16 19:07     ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161116120850.5f923597@pinnacle.lan \
    --to=kevin@buettner.to \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox