From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25473 invoked by alias); 30 Jul 2013 15:38:25 -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 25464 invoked by uid 89); 30 Jul 2013 15:38:25 -0000 X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_MED,RCVD_IN_HOSTKARMA_W,RDNS_NONE autolearn=ham version=3.3.1 Received: from Unknown (HELO mms2.broadcom.com) (216.31.210.18) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 30 Jul 2013 15:38:25 +0000 Received: from [10.9.208.55] by mms2.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Tue, 30 Jul 2013 08:32:08 -0700 X-Server-Uuid: 4500596E-606A-40F9-852D-14843D8201B2 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS07.corp.ad.broadcom.com (10.9.208.55) with Microsoft SMTP Server (TLS) id 14.1.438.0; Tue, 30 Jul 2013 08:38:11 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.1.438.0; Tue, 30 Jul 2013 08:38:11 -0700 Received: from [10.177.72.91] (unknown [10.177.72.91]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 1A61FF2D73; Tue, 30 Jul 2013 08:38:10 -0700 (PDT) Message-ID: <51F7DDE2.1060003@broadcom.com> Date: Tue, 30 Jul 2013 15:38:00 -0000 From: "Andrew Burgess" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: "gdb-patches@sourceware.org" cc: "Pedro Alves" Subject: Re: [PATCH] [2/2] Don't raise an error for optimized out sub-fields. References: <51DEC299.8040109@broadcom.com> <51F7D367.8030605@redhat.com> In-Reply-To: <51F7D367.8030605@redhat.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00773.txt.bz2 On 30/07/2013 3:53 PM, Pedro Alves wrote: > 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. Confirmed that we get an error for the example you gave. I've included a test of this as part of this commit. > >> 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. Committed. Thanks, Andrew