Use bfd_get_filename instead of objfile_name in lookup_dwo_unit
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 27 May 2020 15:13:55 +0000 (11:13 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 27 May 2020 15:15:55 +0000 (11:15 -0400)
There should be no functional difference, as objfile_name defers to
bfd_get_filename if objfile::obfd is non-NULL, which should be the case
here.  This allows to remove a reference to
dwarf2_per_cu_data::dwarf2_per_objfile.

gdb/ChangeLog:

* dwarf2/read.c (lookup_dwo_unit): Use bfd_get_filename instead
of objfile_name.

Change-Id: I1e1c1870820aec23701edc9c3994612da5781c23

gdb/ChangeLog
gdb/dwarf2/read.c

index 39fa1aeae47e53699e6395549809583677b748dd..3ba5df428a80721590612d5123eec464c0d08ad4 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-27  Simon Marchi  <simon.marchi@efficios.com>
+
+       * dwarf2/read.c (lookup_dwo_unit): Use bfd_get_filename instead
+       of objfile_name.
+
 2020-05-27  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * dwarf2/read.h (struct dwarf2_per_bfd) <obfd>: New member.
index aa1c3f0e92be5cd60558ac9776c739bf44aca60b..2ee98cc1b8cebd341ed1dae34e925f0975db3d33 100644 (file)
@@ -6888,7 +6888,7 @@ lookup_dwo_unit (struct dwarf2_per_cu_data *this_cu,
       if (!signature.has_value ())
        error (_("Dwarf Error: missing dwo_id for dwo_name %s"
                 " [in module %s]"),
-              dwo_name, objfile_name (this_cu->dwarf2_per_objfile->objfile));
+              dwo_name, bfd_get_filename (this_cu->per_bfd->obfd));
       dwo_unit = lookup_dwo_comp_unit (this_cu, dwo_name, comp_dir,
                                       *signature);
     }
This page took 0.036278 seconds and 4 git commands to generate.