]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use bfd_get_filename instead of objfile_name in lookup_dwo_unit
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 25 Feb 2020 16:57:12 +0000 (11:57 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 12 May 2020 19:24:50 +0000 (15:24 -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.

gdb/dwarf2/read.c

index 36c643413aa3b41becdaade125cb78518578c3a7..504a260338d54e3152f55baa1c3e8abba1c42140 100644 (file)
@@ -6850,7 +6850,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);
     }