From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27063 invoked by alias); 21 Mar 2013 16:48:27 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 25641 invoked by uid 89); 21 Mar 2013 16:48:15 -0000 X-Spam-SWARE-Status: No, score=-8.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 21 Mar 2013 16:48:13 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2LGmAgo026925 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Mar 2013 12:48:10 -0400 Received: from host2.jankratochvil.net (ovpn-116-42.ams2.redhat.com [10.36.116.42]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2LGm6kW004302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 21 Mar 2013 12:48:09 -0400 Date: Thu, 21 Mar 2013 16:48:00 -0000 From: Jan Kratochvil To: Michael Haupt Cc: "gdb@sourceware.org" Subject: Re: "optimized out" in spite of DWARF saying otherwise? Message-ID: <20130321164806.GA19532@host2.jankratochvil.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-03/txt/msg00065.txt.bz2 On Thu, 21 Mar 2013 17:39:26 +0100, Michael Haupt wrote: > so I have this formal argument to a method, and my DWARF says > > 0x...e642 - 0x...e642: rdi > > (note start and end are the same). gdb, however, insists on the value being > "", with the current address being 0x...e642. How is this? That is correct. DWARF4: 2. An ending address offset. [...] It marks the first address past the end of the address range over which the location is valid. Such entry in fact does not say anything, it covers zero bytes. (1) You should look on other entries in that location list (if any). (2) This "weird" entry can be used for so-called "entry-values" resolving. Try in GDB "set debug entry-values 1" (before stopping in this function) to see more debug information why GDB failed to resolve the parameter. I have to recomment FSF GDB HEAD (CVS/GIT) or the 7.6 pre-release, I made recently there some entry-values resolving fixes. Regards, Jan