From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26375 invoked by alias); 12 Sep 2012 17:30:23 -0000 Received: (qmail 26363 invoked by uid 22791); 12 Sep 2012 17:30:22 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Sep 2012 17:30:02 +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 q8CHU0Xt030376 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 Sep 2012 13:30:01 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q8CHTx5H021350 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 12 Sep 2012 13:30:00 -0400 From: Tom Tromey To: "Andrew Burgess" Cc: "gdb-patches\@sourceware.org" , "Jan Kratochvil" Subject: Re: PATCH: error reading variable: value has been optimized out References: <50376F3B.1080407@broadcom.com> <20120826171840.GA21205@host2.jankratochvil.net> <504092C0.2000602@broadcom.com> Date: Wed, 12 Sep 2012 17:30:00 -0000 In-Reply-To: <504092C0.2000602@broadcom.com> (Andrew Burgess's message of "Fri, 31 Aug 2012 11:32:32 +0100") Message-ID: <87wqzz5eug.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 X-SW-Source: 2012-09/txt/msg00212.txt.bz2 >>>>> "Andrew" == Andrew Burgess writes: Andrew> (3) Structures the size of two registers split over two Andrew> registers using dwarf piece information. Andrew> (4) Values the size of a single register split over two Andrew> registers using dwarf piece information to describe the Andrew> location. Andrew> Cases (3) and (4) are not fixed by my original patch, and fail Andrew> for a different reason. I could remove these from the test, but Andrew> I believe the tests are reasonable, or at least not totally Andrew> crazy, so I'm reluctant to just delete them. I could just Andrew> commit the test with these two examples marked as known failing Andrew> .... or I could fix them :) Andrew> The problem is this, Andrew> - In dwarf2loc.c:dwarf_evaluate_loc_desc_full we create the Andrew> computed value from the pieced location information. Andrew> - In dwarf2loc.c:read_pieced_value we spot that some of the Andrew> registers are missing and mark the computed value as optimized Andrew> out. This scenario seems odd to me. I think what it means is that the compiler declares an object as being split between two registers -- but then also knows that one of the registers is not in fact available. Does any compiler actually do this? If it is just a theoretical problem I think we can just declare it unsupported; and, if we do see it, try reporting it as a compiler bug first. After all, the compiler could just emit an empty piece instead. Tom