diff options
-rw-r--r-- | gdb/dwarf2/read.c | 18 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/clang-debug-names.exp | 13 |
3 files changed, 23 insertions, 12 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 439b889..4c8a071 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -5352,6 +5352,18 @@ dw2_debug_names_iterator::next () ull = read_unsigned_leb128 (abfd, m_addr, &bytes_read); m_addr += bytes_read; break; + case DW_FORM_ref4: + ull = read_4_bytes (abfd, m_addr); + m_addr += 4; + break; + case DW_FORM_ref8: + ull = read_8_bytes (abfd, m_addr); + m_addr += 8; + break; + case DW_FORM_ref_sig8: + ull = read_8_bytes (abfd, m_addr); + m_addr += 8; + break; default: complaint (_("Unsupported .debug_names form %s [in module %s]"), dwarf_form_name (attr.form), @@ -5384,6 +5396,12 @@ dw2_debug_names_iterator::next () } per_cu = &dwarf2_per_objfile->get_tu (ull)->per_cu; break; + case DW_IDX_die_offset: + /* In a per-CU index (as opposed to a per-module index), index + entries without CU attribute implicitly refer to the single CU. */ + if (per_cu == NULL) + per_cu = dwarf2_per_objfile->get_cu (0); + break; case DW_IDX_GNU_internal: if (!m_map.augmentation_is_gdb) break; diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 49445fa..eccba67 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-05-09 Tom de Vries <tdevries@suse.de> + + * gdb.dwarf2/clang-debug-names.exp: Remove PR25952 kfail. + 2020-05-08 Tom de Vries <tdevries@suse.de> * gdb.dwarf2/clang-debug-names.c: New test. diff --git a/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp b/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp index 8bd6040..a6e33c1 100644 --- a/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp +++ b/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp @@ -142,15 +142,4 @@ set pass_re \ [multi_line \ $cmd \ "type = int \\(\\)"] -set kfail_re \ - [multi_line \ - $cmd \ - "type = <unknown return type> \\(\\)"] -gdb_test_multiple $cmd "" { - -re -wrap $pass_re { - pass $gdb_test_name - } - -re -wrap $kfail_re { - kfail symtab/25952 $gdb_test_name - } -} +gdb_test $cmd $pass_re |