aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2025-04-17 15:37:22 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2025-04-20 01:01:57 -0400
commit1150b0389aa91beb93ebb201fbc64802d4670032 (patch)
tree97307356504e072587663e121eb871687baa3aa5
parentd19cd04bf81f2e312d9bda5d3628a591e0e09438 (diff)
downloadbinutils-1150b0389aa91beb93ebb201fbc64802d4670032.zip
binutils-1150b0389aa91beb93ebb201fbc64802d4670032.tar.gz
binutils-1150b0389aa91beb93ebb201fbc64802d4670032.tar.bz2
gdb/dwarf: remove unnecessary dwarf2_section_info:::read calls
The sections would have been read already in dwarf2_locate_common_dwp_sections or dwarf2_locate_dwo_sections, with this call: dw_sect->read (objfile); Change-Id: Ice0ed5d9a2070967826a59b2d6f724451ace22f4 Approved-By: Tom Tromey <tom@tromey.com>
-rw-r--r--gdb/dwarf2/read.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index ebd1ad6..5c22c9c 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -2392,7 +2392,6 @@ create_dwo_debug_type_hash_table (dwarf2_per_objfile *per_objfile,
dwo_file *dwo_file, dwarf2_section_info *section,
rcuh_kind section_kind)
{
- struct objfile *objfile = per_objfile->objfile;
struct dwarf2_section_info *abbrev_section;
bfd *abfd;
const gdb_byte *info_ptr, *end_ptr;
@@ -2403,7 +2402,6 @@ create_dwo_debug_type_hash_table (dwarf2_per_objfile *per_objfile,
section->get_name (),
abbrev_section->get_file_name ());
- section->read (objfile);
info_ptr = section->buffer;
if (info_ptr == NULL)
@@ -6310,12 +6308,10 @@ static void
create_dwo_cus_hash_table (dwarf2_cu *cu, dwo_file &dwo_file)
{
dwarf2_per_objfile *per_objfile = cu->per_objfile;
- struct objfile *objfile = per_objfile->objfile;
dwarf2_per_bfd *per_bfd = per_objfile->per_bfd;
const gdb_byte *info_ptr, *end_ptr;
auto &section = dwo_file.sections.info;
- section.read (objfile);
info_ptr = section.buffer;
if (info_ptr == NULL)
@@ -6538,7 +6534,6 @@ static struct dwp_hash_table *
create_dwp_hash_table (dwarf2_per_objfile *per_objfile,
struct dwp_file *dwp_file, int is_debug_types)
{
- struct objfile *objfile = per_objfile->objfile;
bfd *dbfd = dwp_file->dbfd.get ();
const gdb_byte *index_ptr, *index_end;
struct dwarf2_section_info *index;
@@ -6552,7 +6547,6 @@ create_dwp_hash_table (dwarf2_per_objfile *per_objfile,
if (index->empty ())
return NULL;
- index->read (objfile);
index_ptr = index->buffer;
index_end = index_ptr + index->size;