]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove call to dwarf2_per_objfile::adjust from read_attribute_value
authorTom Tromey <tom@tromey.com>
Mon, 1 Apr 2024 23:03:45 +0000 (17:03 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 4 May 2024 15:30:30 +0000 (09:30 -0600)
Currently, read_attribute_value calls dwarf2_per_objfile::adjust on
any address.  This seems wrong, because the address may not even be in
the text section.

Luckily, this call is also not needed, because read_func_scope calls
'relocate', which does the same work.

gdb/dwarf2/read.c

index 7caacd25474055569e511d1f18d1248c7b9835f0..68e093c23004d69beb22c4c9cae3cf5840716ee3 100644 (file)
@@ -17010,7 +17010,6 @@ read_attribute_value (const struct die_reader_specs *reader,
       {
        unrelocated_addr addr = cu_header->read_address (abfd, info_ptr,
                                                         &bytes_read);
-       addr = per_objfile->adjust (addr);
        attr->set_address (addr);
        info_ptr += bytes_read;
       }