Handing DW_OP_addr in computed symbol locations

Jonas Maebe jonas.maebe@elis.ugent.be
Mon Mar 16 20:58:00 GMT 2009


On 16 Mar 2009, at 21:44, Jan Kratochvil wrote:

> 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

Thanks for the tip, this indeed works fine!


Jonas



More information about the Gdb mailing list