]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/dwarf: remove unnecessary parameter of create_cus_hash_table
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 5 Mar 2025 05:06:37 +0000 (00:06 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 5 Mar 2025 16:58:31 +0000 (11:58 -0500)
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>
gdb/dwarf2/read.c

index 3a4e350e7bbbfd034d0dad82f0ddb8f8ded7e09a..a0003b998e2a426b96277be1cab3f5a374e30e74 100644 (file)
@@ -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 &section, 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)
     {