From patchwork Tue Nov 22 08:59:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 17699 Received: (qmail 50744 invoked by alias); 22 Nov 2016 09:00:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 50615 invoked by uid 89); 22 Nov 2016 09:00:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=2016-11-22 X-HELO: mail-wj0-f194.google.com Received: from mail-wj0-f194.google.com (HELO mail-wj0-f194.google.com) (209.85.210.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 Nov 2016 09:00:16 +0000 Received: by mail-wj0-f194.google.com with SMTP id jb2so5770308wjb.3 for ; Tue, 22 Nov 2016 01:00:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=ebLIkmdhR2JISvzQ2YMHXgZdXzveZpH/LJcc/tV8i4A=; b=EZbP/AQ+5epeMI6rujYjk+XZ5B9K36L2Y3fJtja93q5uDJhUmod5+W1xej4/X2R6Q2 yFsQ4Ef/gcjkJzhRqpNVUcduo5Pn2vNwW3ViSGQnRFwvOfOVLI8TOsOILcHWiCFyl6f9 ESmzJHsrJMKz1mjtdWWGac20VHK8xh3AxFrwQuFd00M6nzt+GBVVjHmfkMXtlTw2HP3U 85ZmlZu6uzcNYf7R7hCjsvGkX1ZwjZUAwOkTJ9jtEjRGokH+S/+jTroJ/+Fr8ubfsT2p rgWMfQrFympyIgpludiNQwLnPm7fVqJSbmSq1FblUYudOfY/Dj/8spIzwGEiEiDs3Ok/ CxLA== X-Gm-Message-State: AKaTC00IOWhLQ1EFY5mSPqOBLWlFOFOceIEa+XIBrSHa4NWyul8xMbexOymDM+vaRncwcg== X-Received: by 10.194.60.195 with SMTP id j3mr13373176wjr.149.1479805214396; Tue, 22 Nov 2016 01:00:14 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id f126sm1718913wme.22.2016.11.22.01.00.11 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 22 Nov 2016 01:00:13 -0800 (PST) Date: Tue, 22 Nov 2016 08:59:59 +0000 From: Yao Qi To: Ulrich Weigand Cc: user-agent@de.ibm.com, "gdb-patches@sourceware.org" , Tom Tromey Subject: Re: set_value_component_location in apply_val_pretty_printer Message-ID: <20161122085959.GB24810@E107787-LIN> References: <20161114125143.GA22037@E107787-LIN> <20161114163832.3C14F10B924@oc8523832656.ibm.com> <20161121141428.GB28605@E107787-LIN> <20161121203724.ttcwotysdozdzn7v@localhost> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20161121203724.ttcwotysdozdzn7v@localhost> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes On Mon, Nov 21, 2016 at 08:37:24PM +0000, Yao Qi wrote: > On Mon, Nov 21, 2016 at 06:23:47PM +0000, Yao Qi wrote: > > I removed the code setting VALUE_NEXT_FRAME_ID, but > > value_from_component only sets VALUE_FRAME_ID. The change > > above is not equivalent, and it causes some regressions in > > https://sourceware.org/ml/gdb-testers/2016-q4/msg03381.html > > > > Sorry about that. The fix would be setting both > > VALUE_NEXT_FRAME_ID and VALUE_FRAME_ID in > > value_from_component. I'll give a fix. > > > > Oh, looks we renamed VALUE_FRAME_ID to VALUE_NEXT_FRAME_ID recently, > https://sourceware.org/ml/gdb-patches/2016-11/msg00018.html > and I regression tested against a copy of one-week-old gdb, but > didn't see the regression. The fix would be replacing VALUE_FRAME_ID > with VALUE_NEXT_FRAME_ID in my patch. Testing the fix... > The patch below fixes the regressions by replacing VALUE_FRAME_ID with VALUE_NEXT_FRAME_ID in value_from_component. I pushed it in. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dfaddd1..5b88917 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-11-22 Yao Qi + + * value.c (value_from_component): Use VALUE_NEXT_FRAME_ID + instead of VALUE_FROM_ID. + 2016-11-21 Simon Marchi * Makefile.in (%o: $(srcdir)/mi/%.c): Add missing POSTCOMPILE diff --git a/gdb/value.c b/gdb/value.c index 200d61d..8d33501 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -3815,7 +3815,7 @@ value_from_component (struct value *whole, struct type *type, LONGEST offset) v->offset = value_offset (whole) + offset + value_embedded_offset (whole); set_value_component_location (v, whole); VALUE_REGNUM (v) = VALUE_REGNUM (whole); - VALUE_FRAME_ID (v) = VALUE_FRAME_ID (whole); + VALUE_NEXT_FRAME_ID (v) = VALUE_NEXT_FRAME_ID (whole); return v; }