From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12625 invoked by alias); 30 Jul 2013 14:45:20 -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 12583 invoked by uid 89); 30 Jul 2013 14:45:20 -0000 X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 30 Jul 2013 14:45:19 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6UEj637013099 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Jul 2013 10:45:10 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r6UEj5sI009175; Tue, 30 Jul 2013 10:45:06 -0400 Message-ID: <51F7D171.4010909@redhat.com> Date: Tue, 30 Jul 2013 14:45:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Andrew Burgess CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH] [1/2] value_fetch_lazy - ensure parent is not lazy before accessing. References: <51DEC28A.60701@broadcom.com> In-Reply-To: <51DEC28A.60701@broadcom.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00766.txt.bz2 On 07/11/2013 03:34 PM, Andrew Burgess wrote: > Hi, > > Within value_fetch_lazy, for bit field values we > make use of the parent value without first checking > that the parent is not lazy. > - if (!value_bits_valid (val, > + if (value_lazy (parent)) > + value_fetch_lazy (parent); > + > + if (!value_bits_valid (parent, The: > - if (!value_bits_valid (val, > + if (!value_bits_valid (parent, change gave me pause, as it wasn't mentioned in the email. It just looked like a mistake in your patch, as one would only expect the new value_fetch_lazy call, and nothing else. But, looking deeper, AFAICS, that change is correct, we were looking at the wrong value, even if the lazy issue didn't exist. Please correct me if I'm wrong. (I'd have preferred that bit to have been a separate, preparatory change with its own justification, or at least that this had been mentioned in the email. Don't assume what's obvious to you is obvious to others.) > 2013-07-11 Andrew Burgess > > * value.c (value_fetch_lazy): Ensure parent value is not lazy > before checking which bits of the parent are valid. > > gdb/testsuite/ChangeLog > > 2013-07-11 Andrew Burgess > > * gdb.dwarf2/pieces-optimized-out.exp: New file. > * gdb.dwarf2/pieces-optimized-out.c: New file. > * gdb.dwarf2/pieces-optimized-out.S: New file. OK. -- Pedro Alves