public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Remove call to dwarf2_per_objfile::adjust from read_attribute_value
@ 2024-05-04 16:07 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-05-04 16:07 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=12fddc10c3ca745f98bd297ec72732adddb151c0

commit 12fddc10c3ca745f98bd297ec72732adddb151c0
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Apr 1 17:03:45 2024 -0600

    Remove call to dwarf2_per_objfile::adjust from read_attribute_value
    
    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.

Diff:
---
 gdb/dwarf2/read.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 7caacd25474..68e093c2300 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -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;
       }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-04 16:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-04 16:07 [binutils-gdb] Remove call to dwarf2_per_objfile::adjust from read_attribute_value Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).