From c7e976792002c6a2810f9bb6cc3ad210514eb650 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 20 May 2020 07:59:00 +0930 Subject: Use bfd_get_filename throughout gdb This patch makes gdb use the inline accessor for all bfd->filename read accesses. * coff-pe-read.c (read_pe_exported_syms): Use bfd_get_filename rather than accessing bfd->filename directly. * dtrace-probe.c (dtrace_static_probe_ops::get_probes): Likewise, and use bfd_section_name. * dwarf2/frame.c (decode_frame_entry): Likewise. * exec.c (exec_set_section_address): Likewise. * solib-aix.c (solib_aix_bfd_open): Likewise. * stap-probe.c (get_stap_base_address): Likewise. * symfile.c (reread_symbols): Likewise. --- gdb/exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/exec.c') diff --git a/gdb/exec.c b/gdb/exec.c index 932270a..93dd157 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -1173,7 +1173,8 @@ exec_set_section_address (const char *filename, int index, CORE_ADDR address) table = current_target_sections; for (p = table->sections; p < table->sections_end; p++) { - if (filename_cmp (filename, p->the_bfd_section->owner->filename) == 0 + if (filename_cmp (filename, + bfd_get_filename (p->the_bfd_section->owner)) == 0 && index == p->the_bfd_section->index) { p->endaddr += address - p->addr; -- cgit v1.1