/* See cooked-index.h. */
dwarf2_per_cu_data *
-cooked_index::lookup (CORE_ADDR addr)
+cooked_index::lookup (unrelocated_addr addr)
{
/* Ensure that the address maps are ready. */
wait (cooked_state::MAIN_AVAILABLE, true);
/* 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.
/* 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. */
dwarf2_per_cu_data *
dwarf2_base_index_functions::find_per_cu (dwarf2_per_bfd *per_bfd,
- CORE_ADDR adjusted_pc)
+ unrelocated_addr adjusted_pc)
{
if (per_bfd->index_addrmap == nullptr)
return nullptr;
- void *obj = per_bfd->index_addrmap->find (adjusted_pc);
+ void *obj = per_bfd->index_addrmap->find ((CORE_ADDR) adjusted_pc);
return static_cast<dwarf2_per_cu_data *> (obj);
}
dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
CORE_ADDR baseaddr = objfile->text_section_offset ();
- struct dwarf2_per_cu_data *data = find_per_cu (per_objfile->per_bfd,
- pc - baseaddr);
+ struct dwarf2_per_cu_data *data
+ = find_per_cu (per_objfile->per_bfd, (unrelocated_addr) (pc - baseaddr));
if (data == nullptr)
return nullptr;
}
dwarf2_per_cu_data *find_per_cu (dwarf2_per_bfd *per_bfd,
- CORE_ADDR adjusted_pc) override;
+ unrelocated_addr adjusted_pc) override;
struct compunit_symtab *find_compunit_symtab_by_address
(struct objfile *objfile, CORE_ADDR address) override;
dwarf2_per_cu_data *
cooked_index_functions::find_per_cu (dwarf2_per_bfd *per_bfd,
- CORE_ADDR adjusted_pc)
+ unrelocated_addr adjusted_pc)
{
cooked_index *table
= (gdb::checked_static_cast<cooked_index *>
cooked_index *table = wait (objfile, true);
CORE_ADDR baseaddr = objfile->data_section_offset ();
- dwarf2_per_cu_data *per_cu = table->lookup (address - baseaddr);
+ dwarf2_per_cu_data *per_cu
+ = table->lookup ((unrelocated_addr) (address - baseaddr));
if (per_cu == nullptr)
return nullptr;
/* A helper function that finds the per-cu object from an "adjusted"
PC -- a PC with the base text offset removed. */
virtual dwarf2_per_cu_data *find_per_cu (dwarf2_per_bfd *per_bfd,
- CORE_ADDR adjusted_pc);
+ unrelocated_addr adjusted_pc);
struct compunit_symtab *find_pc_sect_compunit_symtab
(struct objfile *objfile, struct bound_minimal_symbol msymbol,