diff options
Diffstat (limited to 'gdb/dwarf2/read.c')
-rw-r--r-- | gdb/dwarf2/read.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 4818da5..6a19064 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -2997,17 +2997,6 @@ recursively_find_pc_sect_compunit_symtab (struct compunit_symtab *cust, return NULL; } -dwarf2_per_cu_data * -dwarf2_base_index_functions::find_per_cu (dwarf2_per_bfd *per_bfd, - unrelocated_addr adjusted_pc) -{ - if (per_bfd->index_addrmap == nullptr) - return nullptr; - - void *obj = per_bfd->index_addrmap->find ((CORE_ADDR) adjusted_pc); - return static_cast<dwarf2_per_cu_data *> (obj); -} - struct compunit_symtab * dwarf2_base_index_functions::find_pc_sect_compunit_symtab (struct objfile *objfile, @@ -3019,10 +3008,14 @@ dwarf2_base_index_functions::find_pc_sect_compunit_symtab struct compunit_symtab *result; dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile); + dwarf2_per_bfd *per_bfd = per_objfile->per_bfd; + + if (per_bfd->index_table == nullptr) + return nullptr; CORE_ADDR baseaddr = objfile->text_section_offset (); struct dwarf2_per_cu_data *data - = find_per_cu (per_objfile->per_bfd, (unrelocated_addr) (pc - baseaddr)); + = per_bfd->index_table->lookup ((unrelocated_addr) (pc - baseaddr)); if (data == nullptr) return nullptr; @@ -16559,16 +16552,6 @@ cooked_indexer::make_index (cutu_reader *reader) index_dies (reader, reader->info_ptr, nullptr, false); } -dwarf2_per_cu_data * -cooked_index_functions::find_per_cu (dwarf2_per_bfd *per_bfd, - unrelocated_addr adjusted_pc) -{ - cooked_index *table - = (gdb::checked_static_cast<cooked_index *> - (per_bfd->index_table.get ())); - return table->lookup (adjusted_pc); -} - struct compunit_symtab * cooked_index_functions::find_compunit_symtab_by_address (struct objfile *objfile, CORE_ADDR address) |