From c2250ad1c4567fd2235cb4131f7cb7c06da3769a Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Thu, 2 Jul 2009 17:06:44 +0000 Subject: * target.h (struct target_ops): New member to_thread_architecture. (target_thread_architecture): New macro. * target.c (update_current_target): Inherit to_thread_architecture. (default_thread_architecture): New function. (debug_to_thread_architecture): New function. (setup_target_debug): Handle to_thread_architecture. * regcache.h (get_thread_arch_regcache): New. * regcache.c (struct regcache_list): New data type. (current_regcache): Hold regcache list instead of single regcache. (current_thread_ptid, current_thread_arch): New static variables. (get_thread_arch_regcache): New function. (get_thread_regcache): Use it. Call target_thread_architecture. (regcache_thread_ptid_changed): Update to current_regcache changes. (registers_changed): Likewise. Reset current_thread_arch and current_thread_ptid. * remote.c (remote_wait): Access target registers in target_gdbarch. * linux-nat.c (linux_nat_do_thread_registers): Likewise. * proc-service.c (ps_lgetregs, ps_lsetregs): Likewise. (ps_lgetfpregs, ps_lsetfpregs): Likewise. * sol-thread.c (ps_lgetregs, ps_lsetregs): Likewise. (ps_lgetfpregs, ps_lsetfpregs): Likewise. * solib-svr4.c (enable_break): Likewise. (svr4_relocate_main_executable): Likewise. --- gdb/solib-svr4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/solib-svr4.c') diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index 29ccbb6..bb2cefc 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -1380,7 +1380,8 @@ enable_break (struct svr4_info *info) most cases. */ if (!load_addr_found) { - struct regcache *regcache = get_thread_regcache (inferior_ptid); + struct regcache *regcache + = get_thread_arch_regcache (inferior_ptid, target_gdbarch); load_addr = (regcache_read_pc (regcache) - exec_entry_point (tmp_bfd, tmp_bfd_target)); } @@ -1517,7 +1518,8 @@ static void svr4_relocate_main_executable (void) { asection *interp_sect; - struct regcache *regcache = get_thread_regcache (inferior_ptid); + struct regcache *regcache + = get_thread_arch_regcache (inferior_ptid, target_gdbarch); CORE_ADDR pc = regcache_read_pc (regcache); /* Decide if the objfile needs to be relocated. As indicated above, -- cgit v1.1