From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19357 invoked by alias); 22 Sep 2014 18:44:46 -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 19345 invoked by uid 89); 22 Sep 2014 18:44:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 22 Sep 2014 18:44:45 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8MIiGla029822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 22 Sep 2014 14:44:17 -0400 Received: from host2.jankratochvil.net (ovpn-116-67.ams2.redhat.com [10.36.116.67]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8MIiCMG004392 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Mon, 22 Sep 2014 14:44:15 -0400 Date: Mon, 22 Sep 2014 18:44:00 -0000 From: Jan Kratochvil To: Eli Zaretskii Cc: yao@codesourcery.com, gdb@sourceware.org Subject: Re: Complex DWARF expressions Message-ID: <20140922184412.GA23523@host2.jankratochvil.net> References: <83sijkydk4.fsf@gnu.org> <87a95sxkjr.fsf@codesourcery.com> <20140922061654.GA15537@host2.jankratochvil.net> <83a95ry0rp.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83a95ry0rp.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00072.txt.bz2 On Mon, 22 Sep 2014 20:21:14 +0200, Eli Zaretskii wrote: > Why can't GDB apply all this, and show a value for a given PC? There is some reason why GDB could not determine it, this is very normal situation. It would be really great if GDB could always display all values for -O2 -g code but that can never be possible (without reducing runtime code peformance and size). To find out why use: (gdb) set debug entry-values 1 For example the call site may not have matching DW_AT_GNU_call_site_value because the value is just no longer computable at the caller frame from any data at that point of execution. Entry values improved the number of cases where the value is retrievable but it is still far from 100% retrievability. One needs to use -O0 -g to get the values in 100% of cases. Debug info never degrades inferior runtime code performance or size to get better debug info. Besides that there may be GDB bug. And there is also at least one GCC bug: entry-value: Missing DW_AT_linkage_name for C<->C++ calls http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56502 Jan