aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-27 11:13:55 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-27 11:15:55 -0400
commit313bad1bc60b24722cd44c196acf3482b5b63efd (patch)
tree177845b51a8e65f14b203f3e429ed82bd93dc47f
parentc3699833af0343d13d7d39b3c589d3ac5b930137 (diff)
downloadgdb-313bad1bc60b24722cd44c196acf3482b5b63efd.zip
gdb-313bad1bc60b24722cd44c196acf3482b5b63efd.tar.gz
gdb-313bad1bc60b24722cd44c196acf3482b5b63efd.tar.bz2
Use bfd_get_filename instead of objfile_name in lookup_dwo_unit
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
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/dwarf2/read.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 39fa1ae..3ba5df4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index aa1c3f0..2ee98cc 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -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);
}