Compile this with -g: namespace x { int x; } class y { public: static int x; }; int y::x; int main() { return x::x; }
Now examine the debug_pubnames section with readelf. I see: 70 main 119 x 130 y::x However, I expected "x::x"; "y::x" seems correct. The dwarf spec is a bit weird here: > In the case of the name of a function member or static data member > of a C++ structure, class or union, the name presented in the > .debug_pubnames section is not the simple name given by the > DW_AT_name attribute of the referenced debugging entry, but rather > the fully qualified name of the data or function member. It doesn't mention namespaces. However, this is not very useful; and perhaps this text is not normative. -- Summary: namespaces represented incorrectly in debug_pubnames Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tromey at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39706