public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Remove call to dwarf2_per_objfile::adjust from ranges readers Date: Sat, 4 May 2024 16:06:57 +0000 (GMT) [thread overview] Message-ID: <20240504160657.EEC1A3858C53@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=91fc201ed4a822f5fa86d1075806470c327bc455 commit 91fc201ed4a822f5fa86d1075806470c327bc455 Author: Tom Tromey <tom@tromey.com> Date: Mon Apr 1 17:00:21 2024 -0600 Remove call to dwarf2_per_objfile::adjust from ranges readers dwarf2_per_objfile::adjust applies gdbarch_adjust_dwarf2_addr to an address, leaving the result unrelocated. However, this adjustment is only needed for text-section symbols -- it isn't needed for any sort of address mapping. Therefore, these calls can be removed from read_addrmap_from_aranges and create_addrmap_from_gdb_index. Approved-By: Andrew Burgess <aburgess@redhat.com> Diff: --- gdb/dwarf2/aranges.c | 2 -- gdb/dwarf2/read-gdb-index.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/gdb/dwarf2/aranges.c b/gdb/dwarf2/aranges.c index d577db62726..0d1dc11e27a 100644 --- a/gdb/dwarf2/aranges.c +++ b/gdb/dwarf2/aranges.c @@ -190,8 +190,6 @@ read_addrmap_from_aranges (dwarf2_per_objfile *per_objfile, continue; } ULONGEST end = start + length; - start = (ULONGEST) per_objfile->adjust ((unrelocated_addr) start); - end = (ULONGEST) per_objfile->adjust ((unrelocated_addr) end); mutable_map->set_empty (start, end - 1, per_cu); } diff --git a/gdb/dwarf2/read-gdb-index.c b/gdb/dwarf2/read-gdb-index.c index e743ce13978..94109244b3e 100644 --- a/gdb/dwarf2/read-gdb-index.c +++ b/gdb/dwarf2/read-gdb-index.c @@ -567,8 +567,6 @@ create_addrmap_from_gdb_index (dwarf2_per_objfile *per_objfile, continue; } - lo = (ULONGEST) per_objfile->adjust ((unrelocated_addr) lo); - hi = (ULONGEST) per_objfile->adjust ((unrelocated_addr) hi); mutable_map.set_empty (lo, hi - 1, per_bfd->get_cu (cu_index)); }
reply other threads:[~2024-05-04 16:06 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240504160657.EEC1A3858C53@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@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: linkBe 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).