diff options
author | Tom Tromey <tromey@adacore.com> | 2023-12-14 13:13:59 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-01-09 06:58:51 -0700 |
commit | bdb4b8036fd60438ac614d8a8326a17fa5f4ebe7 (patch) | |
tree | a46b8d79ad46481586768f9f9515f0087a7822b1 /gdb/dwarf2/cooked-index.h | |
parent | 7c3df3c680c2bee0b17e60bfbadc751c67e05ed0 (diff) | |
download | gdb-bdb4b8036fd60438ac614d8a8326a17fa5f4ebe7.zip gdb-bdb4b8036fd60438ac614d8a8326a17fa5f4ebe7.tar.gz gdb-bdb4b8036fd60438ac614d8a8326a17fa5f4ebe7.tar.bz2 |
Use unrelocated_addr in dwarf2_base_index_functions::find_per_cu
dwarf2_base_index_functions::find_per_cu is documented as using an
unrelocated address. This patch changes the interface to use the
unrelocated_addr type, just to be a bit more type-safe.
Regression tested on x86-64 Fedora 38.
Diffstat (limited to 'gdb/dwarf2/cooked-index.h')
-rw-r--r-- | gdb/dwarf2/cooked-index.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/dwarf2/cooked-index.h b/gdb/dwarf2/cooked-index.h index 909e4c0..b14930d 100644 --- a/gdb/dwarf2/cooked-index.h +++ b/gdb/dwarf2/cooked-index.h @@ -309,9 +309,10 @@ private: /* Look up ADDR in the address map, and return either the corresponding CU, or nullptr if the address could not be found. */ - dwarf2_per_cu_data *lookup (CORE_ADDR addr) + dwarf2_per_cu_data *lookup (unrelocated_addr addr) { - return static_cast<dwarf2_per_cu_data *> (m_addrmap->find (addr)); + return (static_cast<dwarf2_per_cu_data *> + (m_addrmap->find ((CORE_ADDR) addr))); } /* Create a new cooked_index_entry and register it with this object. @@ -625,7 +626,7 @@ public: /* Look up ADDR in the address map, and return either the corresponding CU, or nullptr if the address could not be found. */ - dwarf2_per_cu_data *lookup (CORE_ADDR addr); + dwarf2_per_cu_data *lookup (unrelocated_addr addr); /* Return a new vector of all the addrmaps used by all the indexes held by this object. */ |