------- Comment #4 from tromey at gcc dot gnu dot org  2010-08-31 18:33 -------
Created an attachment (id=21610)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21610&action=view)
a simple test case

I'm attaching "temargs.cc", a simple test case from the gdb test suite.
I compiled this with today's svn trunk gcc.

When I dump the resulting DWARF I see good results for Base<double, ...>:

 <1><47>: Abbrev Number: 5 (DW_TAG_structure_type)
    <48>   DW_AT_name        : (indirect string, offset: 0x43): Base<double,
23, (& a_global), &S::f>   
    <4c>   DW_AT_byte_size   : 1        
    <4d>   DW_AT_decl_file   : 1        
    <4e>   DW_AT_decl_line   : 29       
    <4f>   DW_AT_sibling     : <0xb4>   
 <2><53>: Abbrev Number: 6 (DW_TAG_template_type_param)
    <54>   DW_AT_name        : T        
    <56>   DW_AT_type        : <0xb4>   
[...]


But I don't see the right results for Base<long, ...>.  It is missing
all the template parameters:

 <1><d0>: Abbrev Number: 5 (DW_TAG_structure_type)
    <d1>   DW_AT_name        : (indirect string, offset: 0x191): Base<long int,
47, (& a_global), &S::f>        
    <d5>   DW_AT_byte_size   : 1        
    <d6>   DW_AT_decl_file   : 1        
    <d7>   DW_AT_decl_line   : 29       
    <d8>   DW_AT_sibling     : <0x105>  
 <2><dc>: Abbrev Number: 16 (DW_TAG_structure_type)
    <dd>   DW_AT_name        : (indirect string, offset: 0x157): Inner<float>   
    <e1>   DW_AT_byte_size   : 1        
    <e2>   DW_AT_decl_file   : 1        
    <e3>   DW_AT_decl_line   : 32       
 <3><e4>: Abbrev Number: 6 (DW_TAG_template_type_param)
    <e5>   DW_AT_name        : Z        
    <e7>   DW_AT_type        : <0x10c>  
 <3><eb>: Abbrev Number: 12 (DW_TAG_subprogram)
    <ec>   DW_AT_external    : 1        
    <ed>   DW_AT_name        : (indirect string, offset: 0xa8): inner_m 
    <f1>   DW_AT_decl_file   : 1        
    <f2>   DW_AT_decl_line   : 34       
    <f3>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0xb0):
_ZN4BaseIlLi47EXadL_Z8a_globalEEXadL_ZN1S1fEEEE5InnerIfE7inner_mEv 
    <f7>   DW_AT_declaration : 1        
    <f8>   DW_AT_object_pointer: <0xfc> 
 <4><fc>: Abbrev Number: 11 (DW_TAG_formal_parameter)
    <fd>   DW_AT_type        : <0x113>  
    <101>   DW_AT_artificial  : 1       


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41736

Reply via email to