archer-swagiaal-using-directive patch on static variables in methods

Sami Wagiaalla swagiaal@redhat.com
Tue Dec 2 18:50:00 GMT 2008


> The problem is you try to create missing DIEs both for DW_AT_specification and
> DW_AT_abstract_origin.  But DWARF3 (3.3.8.2+3.3.8.3, pages 64-66/267)
> describes such DIEs inheritance only for DW_AT_abstract_origin and not
> DW_AT_specification.

So I created a branch where I reverted my patch 
(1de38657622396795ce681e64b03fb74e81e6c3d) and applied yours 
(60eb8684d0d85d0884aca7a2f013e5eb16a51d47) and I get one regression in 
one of my test cases:

namespace G{
   namespace H  {
     int ghx = 6;
   }
}

namespace I{

   int marker7(){
     using namespace G::H;
     ghx;
     return L::marker8();
   }
}

Print ghx at marker7 fails.

Problem is that the connection between the function die and its import 
statement containing parent is a DW_AT_specification. In this case die 
<87> should be inherited by <2a3>

  <2><72>: Abbrev Number: 6 (DW_TAG_subprogram)
     <73>   DW_AT_external    : 1	
     <74>   DW_AT_name        : (indirect string, offset: 0xbf): marker7	
     <78>   DW_AT_decl_file   : 1	
     <79>   DW_AT_decl_line   : 31	
     <7a>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0x7e): 
_ZN1I7marker7Ev	
     <7e>   DW_AT_type        : <0x96>	
     <82>   DW_AT_declaration : 1	
     <83>   DW_AT_sibling     : <0x8f>	
  <3><87>: Abbrev Number: 3 (DW_TAG_imported_module)
     <88>   DW_AT_decl_file   : 1	
     <89>   DW_AT_decl_line   : 32	
     <8a>   DW_AT_import      : <0xa6>	[Abbrev Number: 9 (DW_TAG_namespace)]
...
  <1><2a3>: Abbrev Number: 17 (DW_TAG_subprogram)
     <2a4>   DW_AT_specification: <0x8f>	
     <2a8>   DW_AT_low_pc      : 0x400572	
     <2b0>   DW_AT_high_pc     : 0x40057d	
     <2b8>   DW_AT_frame_base  : 0x17c	(location list)



More information about the Archer mailing list