Bug 17271 - unsupported tag: DW_TAG_unspecified_type
Summary: unsupported tag: DW_TAG_unspecified_type
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: symtab (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 13.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-14 20:40 UTC by dje
Modified: 2022-09-29 06:18 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments
Tentative patch (1.50 KB, patch)
2022-09-09 08:17 UTC, Tom de Vries
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dje 2014-08-14 20:40:46 UTC
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).
Comment 1 Tom Tromey 2018-06-08 03:49:05 UTC
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.
Comment 2 Tom Tromey 2018-06-08 03:51:47 UTC
process_die ignores a bunch of other things so maybe just doing the
same there is best.
Comment 3 Tom de Vries 2022-09-09 08:17:16 UTC
Created attachment 14330 [details]
Tentative patch

Currently testing.