This is the mail archive of the archer@sourceware.org mailing list for the Archer 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: Cross-CU C++ DIE references vs. mangling


On Wed, 10 Mar 2010 20:18:33 +0100, Jan Kratochvil wrote:
> So GDB has to know the "S::i"->"_ZN1S1iE" mangling rules if there would be no
> DW_AT_MIPS_linkage_name.  Just in this case GDB will find out "S::i" in the
> defining CU (or shared library) and it can completely ignore this declaration.
...
> So there is a countercase where GDB cannot ignore such declaration-only DIE
> (and it is AFAIK the only requirement for GDB internal LOC_UNRESOLVED type):
> namespace S
>   {
>     int f ()
>       {
>         int i = 42;
>         {
>           extern int i;
>           return i;
>         }
>       }
>   }
...
>  <4><92>: Abbrev Number: 9 (DW_TAG_lexical_block)
>     <93>   DW_AT_low_pc      : 0xb      
>     <9b>   DW_AT_high_pc     : 0x11     
>  <2><45>: Abbrev Number: 4 (DW_TAG_variable)
>     <46>   DW_AT_name        : i        
>     <4a>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0x40): _ZN1S1iE   
>     <52>   DW_AT_external    : 1        
>     <53>   DW_AT_declaration : 1        

In this case if it see DW_AT_external + DW_AT_declaration it can also global
"S::i" defining DIE so DW_AT_MIPS_linkage_name is probably really not needed.


Found it only after posting it, sorry,
Jan


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