From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21667 invoked by alias); 16 Mar 2009 20:44:24 -0000 Received: (qmail 21656 invoked by uid 22791); 16 Mar 2009 20:44:23 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Mar 2009 20:44:18 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n2GKiDuY022380 for ; Mon, 16 Mar 2009 16:44:13 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n2GKiDLI021172 for ; Mon, 16 Mar 2009 16:44:13 -0400 Received: from host0.dyn.jankratochvil.net (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n2GKiBYB000375 for ; Mon, 16 Mar 2009 16:44:12 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id n2GKi9lB005800; Mon, 16 Mar 2009 21:44:09 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.2/Submit) id n2GKi9l0005795; Mon, 16 Mar 2009 21:44:09 +0100 Date: Mon, 16 Mar 2009 20:44:00 -0000 From: Jan Kratochvil To: Jonas Maebe Cc: gdb@sourceware.org Subject: Re: Handing DW_OP_addr in computed symbol locations Message-ID: <20090316204409.GA4973@host0.dyn.jankratochvil.net> References: <2DF7F3A9-002C-4D52-9FB2-D7DFFBA36024@elis.ugent.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2DF7F3A9-002C-4D52-9FB2-D7DFFBA36024@elis.ugent.be> User-Agent: Mutt/1.5.18 (2008-05-17) X-IsSubscribed: yes 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 X-SW-Source: 2009-03/txt/msg00094.txt.bz2 On Fri, 13 Mar 2009 22:54:36 +0100, Jonas Maebe wrote: > * An aliases for the second field of the above record: > 0x0000005e: TAG_variable [3] > AT_name( "B" ) > AT_location( <0x7> 03 2c 02 00 00 23 02 ( addr > 0x0000022c, plus uconst 0x0002 ) ) This notation is excessive. You can use single DW_OP_addr already containing the constant addition. Any relocations only add the offset, RELA entries use the (A)rgument explicitly, REL entries implicitly. It was fixed for GCC in: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37738#c1 > AT_type( {0x00000083} ( SMALLINT ) ) > > Now, the DW_OP_addr for the original variable and the one for the alias > are handled in a completely different way by gdb's DWARF2 reader: Which would no longer exploit the existing GDB relocation bug. Regards, Jan