Setting complaints to 100 and debugging a file I noticed gdb complaining about DW_TAG_unspecified_type. During symbol reading, unsupported tag: 'DW_TAG_unspecified_type'. This occurs in new_symbol_full (that's the only place I can find that would print that message). gdb has some code to process DW_TAG_unspecified_type, grepping finds it. Apparently new_symbol_full needs to handle it too. Alas I don't have a testcase I can submit (at least not yet).
gdb itself shows this problem now. It happens due to this code in process_die: default: new_symbol (die, NULL, cu); break; Maybe the right thing to do is change new_symbol to just ignore this tag. the DIE in question looks like: (top-gdb) p *$ $3 = { tag = DW_TAG_unspecified_type, num_attrs = 1 '\001', building_fullname = 0 '\000', in_process = 1 '\001', abbrev = 125, sect_off = (unknown: 1206), child = 0x0, sibling = 0x2d2ea00, parent = 0x2e9ee60, attrs = {{ name = DW_AT_name, form = DW_FORM_strp, string_is_canonical = 1, u = { str = 0x7fffe4046e10 "decltype(nullptr)", blk = 0x7fffe4046e10, unsnd = 140737018883600, snd = 140737018883600, addr = 140737018883600, signature = 140737018883600 } }} } That name doesn't seem all that useful. And, the lack of symbols for unspecified types doesn't seem to have hurt so far.
process_die ignores a bunch of other things so maybe just doing the same there is best.
Created attachment 14330 [details] Tentative patch Currently testing.
https://sourceware.org/pipermail/gdb-patches/2022-September/191761.html
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=80eaec735e36598a312f9b184ee4f32bd6c0bab4