From a42d7dd873b1fc989b25c2fc793d6d084c6af907 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 29 Oct 2020 15:04:33 -0600 Subject: Remove symfile_objfile macro This removes the symfile_objfile macro, in favor of just spelling out the member access. gdb/ChangeLog 2020-10-29 Tom Tromey * windows-tdep.c (windows_solib_create_inferior_hook): Update. * target.c (info_target_command): Update. * symfile.c (syms_from_objfile_1, finish_new_objfile) (symbol_file_clear, reread_symbols): Update. * symfile-mem.c (add_symbol_file_from_memory_command): Update. * stabsread.c (scan_file_globals): Update. * solib.c (update_solib_list): Update. * solib-svr4.c (elf_locate_base, open_symbol_file_object) (svr4_fetch_objfile_link_map, enable_break) (svr4_relocate_main_executable) (svr4_iterate_over_objfiles_in_search_order): Update. * solib-frv.c (lm_base, enable_break) (frv_relocate_main_executable): Update. (main_got, frv_fdpic_find_canonical_descriptor): Update. (frv_fetch_objfile_link_map): Update. * solib-dsbt.c (lm_base, dsbt_relocate_main_executable): Update. * solib-darwin.c (darwin_solib_create_inferior_hook): Update. * solib-aix.c (solib_aix_solib_create_inferior_hook): Update. * remote.c (remote_target::get_offsets): Update. (remote_target::start_remote) (extended_remote_target::post_attach): Update. * objfiles.c (entry_point_address_query): Update. * nto-procfs.c (nto_procfs_target::create_inferior): Update. * minsyms.c (get_symbol_leading_char): Update. * frame.c (inside_main_func): Update. * progspace.h (symfile_objfile): Remove macro. --- gdb/objfiles.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/objfiles.c') diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 471a5c4..b322c6b 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -373,12 +373,12 @@ objfile::objfile (bfd *abfd, const char *name, objfile_flags flags_) int entry_point_address_query (CORE_ADDR *entry_p) { - if (symfile_objfile == NULL || !symfile_objfile->per_bfd->ei.entry_point_p) + objfile *objf = current_program_space->symfile_object_file; + if (objf == NULL || !objf->per_bfd->ei.entry_point_p) return 0; - int idx = symfile_objfile->per_bfd->ei.the_bfd_section_index; - *entry_p = (symfile_objfile->per_bfd->ei.entry_point - + symfile_objfile->section_offsets[idx]); + int idx = objf->per_bfd->ei.the_bfd_section_index; + *entry_p = objf->per_bfd->ei.entry_point + objf->section_offsets[idx]; return 1; } -- cgit v1.1