Handing DW_OP_addr in computed symbol locations
Jan Kratochvil
jan.kratochvil@redhat.com
Mon Mar 16 20:44:00 GMT 2009
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
More information about the Gdb
mailing list