Well, the basic issue is that the "linkage name" is produced by libiberty/cp-demangle.c and the DW_AT_name is produced by gcc/cp/error.c, and they don't always agree on the same pretty-printed representation of a C++ expression.

For this case,

The function linkage name has prefix: K<&(S::m(int))>

This isn't actually valid C++ syntax, so the demangler should be adjusted.

Or maybe it is not a bug and one just has to accept the function prefix may
not match its struct/class name?

This would also be a good idea, for robustness when this kind of issue crops up.

Jason

Reply via email to