aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/read-debug-names.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2024-02-09 17:40:35 -0700
committerTom Tromey <tom@tromey.com>2024-02-29 17:12:58 -0700
commit932e5949a9f366d149b1b9093c49225502dee890 (patch)
tree398e742bfbb6598df11c12786bc533b970c90795 /gdb/dwarf2/read-debug-names.c
parent3f13a7b28cb648eb374437271ca3d9bdb86a77dd (diff)
downloadfsf-binutils-gdb-932e5949a9f366d149b1b9093c49225502dee890.zip
fsf-binutils-gdb-932e5949a9f366d149b1b9093c49225502dee890.tar.gz
fsf-binutils-gdb-932e5949a9f366d149b1b9093c49225502dee890.tar.bz2
Use DW_FORM_ref_addr for DIE offset in .debug_names
Today I realized that while the .debug_names writer uses DW_FORM_udata for the DIE offset, DW_FORM_ref_addr would be more appropriate here. This patch makes this change. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31361
Diffstat (limited to 'gdb/dwarf2/read-debug-names.c')
-rw-r--r--gdb/dwarf2/read-debug-names.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/dwarf2/read-debug-names.c b/gdb/dwarf2/read-debug-names.c
index e2563e8..0add804 100644
--- a/gdb/dwarf2/read-debug-names.c
+++ b/gdb/dwarf2/read-debug-names.c
@@ -155,6 +155,10 @@ mapped_debug_names_reader::scan_one_entry (const char *name,
ull = read_unsigned_leb128 (abfd, entry, &bytes_read);
entry += bytes_read;
break;
+ case DW_FORM_ref_addr:
+ ull = read_offset (abfd, entry, offset_size);
+ entry += offset_size;
+ break;
case DW_FORM_ref4:
ull = read_4_bytes (abfd, entry);
entry += 4;