diff options
author | Tom de Vries <tdevries@suse.de> | 2022-09-16 17:14:34 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-09-16 17:14:34 +0200 |
commit | 80eaec735e36598a312f9b184ee4f32bd6c0bab4 (patch) | |
tree | 5aeb9cce6ab1261c9fc4484631cfc13ac78e0585 /gdb/dwarf2 | |
parent | ff84aaf3e338702f982274ffb79e93562d05070c (diff) | |
download | gdb-80eaec735e36598a312f9b184ee4f32bd6c0bab4.zip gdb-80eaec735e36598a312f9b184ee4f32bd6c0bab4.tar.gz gdb-80eaec735e36598a312f9b184ee4f32bd6c0bab4.tar.bz2 |
[gdb/symtab] Handle named DW_TAG_unspecified_type DIE
With the test-case included in the patch, we run into:
...
(gdb) info types -q std::nullptr_t^M
During symbol reading: unsupported tag: 'DW_TAG_unspecified_type'^M
^M
File /usr/include/c++/7/x86_64-suse-linux/bits/c++config.h:^M
2198: typedef decltype(nullptr) std::nullptr_t;^M
(gdb) FAIL: gdb.dwarf2/nullptr_t.exp: info types -q std::nullptr_t \
without complaint
...
Fix the complaint by handling DW_TAG_unspecified_type in new_symbol, and verify
in the test-case using "maint print symbols" that the symbol exists.
Tested on x86_64-linux, with gcc 7.5.0 and clang 13.0.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17271
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r-- | gdb/dwarf2/read.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 29ccd00..0a3c292 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -21066,6 +21066,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu, case DW_TAG_base_type: case DW_TAG_subrange_type: case DW_TAG_generic_subrange: + case DW_TAG_unspecified_type: sym->set_aclass_index (LOC_TYPEDEF); sym->set_domain (VAR_DOMAIN); list_to_add = cu->list_in_scope; |