From: Simon Marchi Date: Wed, 5 Mar 2025 05:06:37 +0000 (-0500) Subject: gdb/dwarf: remove unnecessary parameter of create_cus_hash_table X-Git-Tag: binutils-2_45~1384 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6170d789a351d2148aea916e2f293bbe6c4b31f;p=thirdparty%2Fbinutils-gdb.git 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 --- 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) {