From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25410 invoked by alias); 30 Jul 2013 14:53:38 -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 25401 invoked by uid 89); 30 Jul 2013 14:53:38 -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:53:37 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6UErTrB022251 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Jul 2013 10:53:29 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r6UErRnl008133; Tue, 30 Jul 2013 10:53:28 -0400 Message-ID: <51F7D367.8030605@redhat.com> Date: Tue, 30 Jul 2013 14:53: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] [2/2] Don't raise an error for optimized out sub-fields. References: <51DEC299.8040109@broadcom.com> In-Reply-To: <51DEC299.8040109@broadcom.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00768.txt.bz2 On 07/11/2013 03:35 PM, Andrew Burgess wrote: > When performing a lazy fetch of a sub-bitfield, we raise an error > if the bits have been optimized-out from the parent value. This > is odd, as in most other cases we report the value as "". Agreed. For printing, we aim at being graceful, and not throw errors. Errors are left for when computing expressions that would require the contents of a non-optimized out value. IOW, gdb_test "p s.d + 1" should still throw. Can you confirm that? Might as well add it to the test while at it. > > This patch marks the result of the lazy fetch as optimized out, > and then returns rather than raising an error. No regressions, > and the one test I see that hits this now seems more consistent. Nice, thanks. > 2013-07-11 Andrew Burgess > > * value.c (value_fetch_lazy): Mark optimized out values as such > rather than raising an error. > > gdb/testsuite/ChangeLog > > 2013-07-11 Andrew Burgess > > * gdb.dwarf2/pieces-optimized-out.exp: Expect "" OK. -- Pedro Alves