aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-frv.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-10-29 15:04:33 -0600
committerTom Tromey <tom@tromey.com>2020-10-29 15:04:37 -0600
commita42d7dd873b1fc989b25c2fc793d6d084c6af907 (patch)
treefc03e49cfc9d6225dfdca489d27035e9af08ffa4 /gdb/solib-frv.c
parent19f6550ebbc922f88026c5c7ebeb04019d47cac2 (diff)
downloadgdb-a42d7dd873b1fc989b25c2fc793d6d084c6af907.zip
gdb-a42d7dd873b1fc989b25c2fc793d6d084c6af907.tar.gz
gdb-a42d7dd873b1fc989b25c2fc793d6d084c6af907.tar.bz2
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 <tom@tromey.com> * 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.
Diffstat (limited to 'gdb/solib-frv.c')
-rw-r--r--gdb/solib-frv.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index 08c9cf7..6c9ab17 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -287,7 +287,7 @@ lm_base (void)
return lm_base_cache;
got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
- symfile_objfile);
+ current_program_space->symfile_object_file);
if (got_sym.minsym == 0)
{
if (solib_frv_debug)
@@ -717,7 +717,7 @@ enable_break (void)
asection *interp_sect;
CORE_ADDR entry_point;
- if (symfile_objfile == NULL)
+ if (current_program_space->symfile_object_file == NULL)
{
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
@@ -784,21 +784,22 @@ frv_relocate_main_executable (void)
main_executable_lm_info = new lm_info_frv;
main_executable_lm_info->map = ldm;
- section_offsets new_offsets (symfile_objfile->section_offsets.size ());
+ objfile *objf = current_program_space->symfile_object_file;
+ section_offsets new_offsets (objf->section_offsets.size ());
changed = 0;
- ALL_OBJFILE_OSECTIONS (symfile_objfile, osect)
+ ALL_OBJFILE_OSECTIONS (objf, osect)
{
CORE_ADDR orig_addr, addr, offset;
int osect_idx;
int seg;
- osect_idx = osect - symfile_objfile->sections;
+ osect_idx = osect - objf->sections;
/* Current address of section. */
addr = obj_section_addr (osect);
/* Offset from where this section started. */
- offset = symfile_objfile->section_offsets[osect_idx];
+ offset = objf->section_offsets[osect_idx];
/* Original address prior to any past relocations. */
orig_addr = addr - offset;
@@ -818,10 +819,10 @@ frv_relocate_main_executable (void)
}
if (changed)
- objfile_relocate (symfile_objfile, new_offsets);
+ objfile_relocate (objf, new_offsets);
- /* Now that symfile_objfile has been relocated, we can compute the
- GOT value and stash it away. */
+ /* Now that OBJF has been relocated, we can compute the GOT value
+ and stash it away. */
main_executable_lm_info->got_value = main_got ();
}
@@ -894,8 +895,8 @@ main_got (void)
{
struct bound_minimal_symbol got_sym;
- got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_",
- NULL, symfile_objfile);
+ objfile *objf = current_program_space->symfile_object_file;
+ got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL, objf);
if (got_sym.minsym == 0)
return 0;
@@ -955,8 +956,9 @@ frv_fdpic_find_canonical_descriptor (CORE_ADDR entry_point)
name = sym->linkage_name ();
/* Check the main executable. */
+ objfile *objf = current_program_space->symfile_object_file;
addr = find_canonical_descriptor_in_load_object
- (entry_point, got_value, name, symfile_objfile->obfd,
+ (entry_point, got_value, name, objf->obfd,
main_executable_lm_info);
/* If descriptor not found via main executable, check each load object
@@ -1110,7 +1112,7 @@ frv_fetch_objfile_link_map (struct objfile *objfile)
solib_add (0, 0, 1);
/* frv_current_sos() will set main_lm_addr for the main executable. */
- if (objfile == symfile_objfile)
+ if (objfile == current_program_space->symfile_object_file)
return main_lm_addr;
/* The other link map addresses may be found by examining the list