[Bug debug/49130] discrepancies between DW_AT_name and demangler
tromey at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 27 17:03:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49130
--- Comment #3 from Tom Tromey <tromey at gcc dot gnu.org> 2011-05-27 16:59:57 UTC ---
Here is another case:
template<class K, unsigned long l>
class S2
{
};
template<typename T> void f(S2<T, sizeof(T*)>) { }
int main()
{
S2<double, sizeof(double*)> s;
f<double> (s);
}
This generates:
<1><29>: Abbrev Number: 2 (DW_TAG_class_type)
<2a> DW_AT_name : (indirect string, offset: 0x88): S2<double, 4ul>
<2e> DW_AT_byte_size : 1
<2f> DW_AT_decl_file : 1
<30> DW_AT_decl_line : 2
<31> DW_AT_sibling : <0x45>
<2><35>: Abbrev Number: 3 (DW_TAG_template_type_param)
<36> DW_AT_name : K
<38> DW_AT_type : <0xad>
<2><3c>: Abbrev Number: 4 (DW_TAG_template_value_param)
<3d> DW_AT_name : l
<3f> DW_AT_type : <0xb4>
<43> DW_AT_const_value : 4
Note that both DW_AT_name and DW_TAG_template_value_param are
incorrect. The demangler gets it right:
void f<double>(S2<double, sizeof (double*)>)
More information about the Gcc-bugs
mailing list