This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Handing DW_OP_addr in computed symbol locations
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Jonas Maebe <jonas dot maebe at elis dot ugent dot be>
- Cc: gdb at sourceware dot org
- Date: Mon, 16 Mar 2009 21:44:09 +0100
- Subject: Re: Handing DW_OP_addr in computed symbol locations
- References: <2DF7F3A9-002C-4D52-9FB2-D7DFFBA36024@elis.ugent.be>
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