From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 4/5] Remove call to dwarf2_per_objfile::adjust from read_attribute_value
Date: Tue, 16 Apr 2024 11:05:26 -0600 [thread overview]
Message-ID: <20240416-dwarf-race-relocate-2-v1-4-1fc912e95e87@tromey.com> (raw)
In-Reply-To: <20240416-dwarf-race-relocate-2-v1-0-1fc912e95e87@tromey.com>
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 | 1 -
1 file changed, 1 deletion(-)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 4168cec5c1a..731a645442d 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -17024,7 +17024,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;
}
--
2.43.0
next prev parent reply other threads:[~2024-04-16 17:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-16 17:05 [PATCH 0/5] Fix race in DWARF reader, 2nd approach Tom Tromey
2024-04-16 17:05 ` [PATCH 1/5] Remove call to dwarf2_per_objfile::adjust from ranges readers Tom Tromey
2024-04-29 12:59 ` Andrew Burgess
2024-04-29 13:16 ` Andrew Burgess
2024-04-29 14:36 ` Andrew Burgess
2024-04-29 20:04 ` Tom Tromey
2024-05-01 14:56 ` Andrew Burgess
2024-05-04 15:30 ` Tom Tromey
2024-04-16 17:05 ` [PATCH 2/5] Remove more calls to dwarf2_per_objfile::adjust Tom Tromey
2024-04-16 17:05 ` [PATCH 3/5] Remove call to dwarf2_per_objfile::adjust from read_call_site_scope Tom Tromey
2024-04-16 17:05 ` Tom Tromey [this message]
2024-04-16 17:05 ` [PATCH 5/5] Remove dwarf2_per_objfile::adjust Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240416-dwarf-race-relocate-2-v1-4-1fc912e95e87@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).