This is the mail archive of the gdb-patches@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: The future of dwarf2_physname


On Fri, May 20, 2011 at 02:38:51PM -0600, Tom Tromey wrote:
> Also even if you strip down the class' DW_AT_name, you probably have
> trouble reconstructing the template argument:
> 
>  <2><51>: Abbrev Number: 5 (DW_TAG_template_value_param)
>     <52>   DW_AT_name        : V        
>     <54>   DW_AT_type        : <0xaf>   
>     <58>   DW_AT_location    : 6 byte block: 3 0 0 0 0 9f       (DW_OP_addr: 0; DW_OP_stack_value)
> 
> ... since that is just the address of 'name', which IIUC may appear
> elsewhere, perhaps without debuginfo.  I guess it ought to always appear
> in minimal symbols in that case... maybe it isn't as bad as I thought.

You can never make this conversion from address to name reliably;
e.g. __attribute__((alias)), ICF [Identical Code Folding] in the
linker, et cetera.

> 
> 
> I get this from my patch branch:
> 
> opsy. ../gdb -readnow -batch -ex 'set complaint 10000' -ex 'file /tmp/q.o'
> During symbol reading...Computed physname <Qux<(char*)(&name)>::foo()> does not match demangled <Qux<&name>::foo()> (from linkage <_ZN3QuxIXadL_Z4nameEEE3fooEv>) - DIE at 0x31 [in module /tmp/q.o]...

What I think would be extraordinarily useful would be to put this
feature together with GCC's quality testsuite and actually get all the
names right... but that really begs the question of which component we're
testing here and where the test should live!

-- 
Daniel Jacobowitz


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