> All in all, I think a better solution would be to put that information > directly in the language_defn itself, via a new "attribute". > Something like a... I ended up choosing this approach. lookup names is still a bit foggy for me, so the comments I wrote and/or the name of the new language_defn attribute might be a bit off. As always, I am grateful for suggestions :). gdb/ChangeLog: PR gdb/22670 * dwarf2read.c (dwarf2_physname): Do not return the demangled symbol name is the CU's language stores symbol names in linkage format. * language.h (struct language_defn) : New field. Adjust all instances of this struct. gdb/testsuite/ChangeLog: * gdb.ada/maint_with_ada.exp: Remove PR gdb/22670 setup_kfail. * gdb.ada/notcplusplus: New testcase. * gdb.base/c-linkage-name.c: New file. * gdb.base/c-linkage-name.exp: New testcase. Tested on x86_64-linux. This also passes AdaCore's internal GDB testsuite. OK to commit? Thank you! -- Joel