[binutils-gdb] gdb/dwarf: remove unnecessary parameter of create_cus_hash_table
Simon Marchi
simark@sourceware.org
Wed Mar 5 17:00:07 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e6170d789a351d2148aea916e2f293bbe6c4b31f
commit e6170d789a351d2148aea916e2f293bbe6c4b31f
Author: Simon Marchi <simon.marchi@efficios.com>
Date: Wed Mar 5 00:06:37 2025 -0500
gdb/dwarf: remove unnecessary parameter of create_cus_hash_table
We can use `cu->per_objfile` instead of passing down a
dwarf2_per_objfile explicitly.
Change-Id: Ie1fd93d9e7a74d09b857f1f0909d7441b79ed893
Approved-By: Tom Tromey <tom@tromey.com>
Diff:
---
gdb/dwarf2/read.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 3a4e350e7bb..a0003b998e2 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -6955,10 +6955,10 @@ create_dwo_cu_reader (const struct die_reader_specs *reader,
Note: This function processes DWO files only, not DWP files. */
static void
-create_cus_hash_table (dwarf2_per_objfile *per_objfile,
- dwarf2_cu *cu, struct dwo_file &dwo_file,
+create_cus_hash_table (dwarf2_cu *cu, struct dwo_file &dwo_file,
dwarf2_section_info §ion, htab_up &cus_htab)
{
+ 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;
@@ -8287,8 +8287,7 @@ open_and_init_dwo_file (dwarf2_cu *cu, const char *dwo_name,
dwarf2_locate_dwo_sections (per_objfile->objfile, dwo_file->dbfd.get (),
sec, &dwo_file->sections);
- create_cus_hash_table (per_objfile, cu, *dwo_file, dwo_file->sections.info,
- dwo_file->cus);
+ create_cus_hash_table (cu, *dwo_file, dwo_file->sections.info, dwo_file->cus);
if (cu->per_cu->version () < 5)
{
More information about the Gdb-cvs
mailing list