aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-dsbt.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:36 -0600
commit7e10abd146dbd17dc1b4e9701210e5724df2b2b0 (patch)
tree5926969f2b04c133c37f91cb35764598e0ce8912 /gdb/solib-dsbt.c
parentb55221abba07302964f697db7eb996ff33b26f5a (diff)
downloadgdb-7e10abd146dbd17dc1b4e9701210e5724df2b2b0.zip
gdb-7e10abd146dbd17dc1b4e9701210e5724df2b2b0.tar.gz
gdb-7e10abd146dbd17dc1b4e9701210e5724df2b2b0.tar.bz2
Remove the exec_bfd macro
This removes the exec_bfd macro, in favor of new accessors on program_space. In one spot the accessor can't be used; but this is still a big improvement over the macro, IMO. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * windows-tdep.c (windows_solib_create_inferior_hook): Update. * symfile.c (reread_symbols): Update. * symfile-mem.c (add_symbol_file_from_memory_command) (add_vsyscall_page): Update. * source-cache.c (source_cache::get_plain_source_lines): Update. * solib-svr4.c (find_program_interpreter, elf_locate_base) (svr4_current_sos_direct, svr4_exec_displacement) (svr4_relocate_main_executable): Update. (svr4_iterate_over_objfiles_in_search_order): Update. * solib-frv.c (enable_break2, enable_break): Update. * solib-dsbt.c (lm_base, enable_break): Update. * solib-darwin.c (find_program_interpreter) (darwin_solib_create_inferior_hook): Update. * sol-thread.c (rw_common, ps_pdmodel): Update. * rs6000-nat.c (rs6000_nat_target::create_inferior): Update. * remote.c (compare_sections_command) (remote_target::trace_set_readonly_regions): Update. * remote-sim.c (get_sim_inferior_data) (gdbsim_target::create_inferior, gdbsim_target::create_inferior): Update. (gdbsim_target_open, gdbsim_target::files_info): Update. * exec.h (exec_bfd): Remove macro. * progspace.c (initialize_progspace): Update. * proc-service.c (ps_addr_to_core_addr, core_addr_to_ps_addr): Update. * nto-procfs.c (nto_procfs_target::post_attach) (nto_procfs_target::create_inferior): Update. * maint.c (maintenance_info_sections): Update. * linux-thread-db.c (thread_db_target::get_thread_local_address): Update. * infcmd.c (post_create_inferior): Update. * gcore.c (default_gcore_arch, default_gcore_target): Update. (objfile_find_memory_regions): Update. * exec.c (validate_exec_file, exec_file_attach) (exec_read_partial_read_only, print_section_info): Update. * corelow.c (core_target_open): Update. * corefile.c (reopen_exec_file, validate_files): Update. * arm-tdep.c (gdb_print_insn_arm): Update. * arch-utils.c (gdbarch_update_p, default_print_insn): Update. * progspace.h (struct program_space) <exec_bfd, set_exec_bfd>: New methods.
Diffstat (limited to 'gdb/solib-dsbt.c')
-rw-r--r--gdb/solib-dsbt.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/solib-dsbt.c b/gdb/solib-dsbt.c
index 6f610c5..8e1da5d 100644
--- a/gdb/solib-dsbt.c
+++ b/gdb/solib-dsbt.c
@@ -562,7 +562,7 @@ lm_base (void)
"lm_base: get addr %x by _GLOBAL_OFFSET_TABLE_.\n",
(unsigned int) addr);
}
- else if (scan_dyntag (DT_PLTGOT, exec_bfd, &addr))
+ else if (scan_dyntag (DT_PLTGOT, current_program_space->exec_bfd (), &addr))
{
struct int_elf32_dsbt_loadmap *ldm;
@@ -778,7 +778,7 @@ enable_break (void)
asection *interp_sect;
struct dsbt_info *info;
- if (exec_bfd == NULL)
+ if (current_program_space->exec_bfd () == NULL)
return 0;
if (!target_has_execution ())
@@ -793,7 +793,8 @@ enable_break (void)
/* Find the .interp section; if not found, warn the user and drop
into the old breakpoint at symbol code. */
- interp_sect = bfd_get_section_by_name (exec_bfd, ".interp");
+ interp_sect = bfd_get_section_by_name (current_program_space->exec_bfd (),
+ ".interp");
if (interp_sect)
{
unsigned int interp_sect_size;
@@ -806,8 +807,8 @@ enable_break (void)
the contents specify the dynamic linker this program uses. */
interp_sect_size = bfd_section_size (interp_sect);
buf = (char *) alloca (interp_sect_size);
- bfd_get_section_contents (exec_bfd, interp_sect,
- buf, 0, interp_sect_size);
+ bfd_get_section_contents (current_program_space->exec_bfd (),
+ interp_sect, buf, 0, interp_sect_size);
/* Now we need to figure out where the dynamic linker was
loaded so that we can load its symbols and place a breakpoint