From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93991 invoked by alias); 16 Nov 2016 19:08:55 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 93969 invoked by uid 89); 16 Nov 2016 19:08:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy= X-HELO: emailserver1.aplushosting.com Received: from emailserver1.asdf456.com (HELO emailserver1.aplushosting.com) (72.18.207.136) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with SMTP; Wed, 16 Nov 2016 19:08:53 +0000 Received: (qmail 30639 invoked by uid 0); 16 Nov 2016 19:08:51 -0000 Received: from unknown (HELO pinnacle.lan) (70.176.31.165) by emailserver1.asdf456.com with SMTP; Wed, 16 Nov 2016 11:08:51 -0800 Date: Wed, 16 Nov 2016 19:08:00 -0000 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: Re: [PATCH v2 3/5] Change meaning of VALUE_FRAME_ID; rename to VALUE_NEXT_FRAME_ID Message-ID: <20161116120850.5f923597@pinnacle.lan> In-Reply-To: References: <20161102151111.2462c806@pinnacle.lan> <20161102151929.748d9cf0@pinnacle.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2016-11/txt/msg00445.txt.bz2 On Wed, 9 Nov 2016 14:48:35 +0000 Pedro Alves 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