]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove call to dwarf2_per_objfile::adjust from ranges readers
authorTom Tromey <tom@tromey.com>
Mon, 1 Apr 2024 23:00:21 +0000 (17:00 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 4 May 2024 15:30:30 +0000 (09:30 -0600)
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>
gdb/dwarf2/aranges.c
gdb/dwarf2/read-gdb-index.c

index d577db6272607261f4b345a5b14ca664e39b1a8f..0d1dc11e27ab28cac6b06b8ed96dd0d0130c8895 100644 (file)
@@ -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);
        }
 
index e743ce13978d1bbfb908d216f78bf676f5d5a99c..94109244b3ee5d55da31579989fe56d10602a66e 100644 (file)
@@ -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));
     }