This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Handing DW_OP_addr in computed symbol locations


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]