From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106329 invoked by alias); 2 Mar 2015 14:59:13 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 106242 invoked by uid 48); 2 Mar 2015 14:59:09 -0000 From: "tromey at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/53927] wrong value for DW_AT_static_link Date: Mon, 02 Mar 2015 14:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 4.6.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg00144.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53927 --- Comment #16 from Tom Tromey --- (In reply to Pierre-Marie de Rodat from comment #15) > (In reply to Pierre-Marie de Rodat from comment #13) > > [1] This patch teaches GDB how to use DW_AT_static_link in order to find the > > frame corresponding to the lexically enclosing scope. I think I will try to > > submit it to GDB soon. > > For the record, here it is: > . I'm curious if you tried it on the test case in this PR. In the patch you wrote: > Since I'm not sure of how this issue should be solved, I'm nevertheless posting this patch here so this matter can be discussed. In the context of this feature, I think we need a backlink from all symbols to the corresponding embedding block but on the other hand only a few blocks have static link: maybe we could turn this static_link field into a objfile-based hashtable lookup. Thoughts? Yeah, growing these is to be avoided. My patch for this added a method to symbol_computed_ops instead. Unfortunately gitorious is acting weird so you can't see the patch online :-(. But you can fetch from https://gitorious.org/binutils-gdb/gdb.git and look at the branch static-link-fix if you like.