diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-07-02 17:06:44 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-07-02 17:06:44 +0000 |
commit | c2250ad1c4567fd2235cb4131f7cb7c06da3769a (patch) | |
tree | d8d42b063e218071644ff3c7c9bcb30b9cdd12d4 /gdb/proc-service.c | |
parent | d452c4bcefbbe7b2305a5ce26469e06d940a690c (diff) | |
download | gdb-c2250ad1c4567fd2235cb4131f7cb7c06da3769a.zip gdb-c2250ad1c4567fd2235cb4131f7cb7c06da3769a.tar.gz gdb-c2250ad1c4567fd2235cb4131f7cb7c06da3769a.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/proc-service.c')
-rw-r--r-- | gdb/proc-service.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/proc-service.c b/gdb/proc-service.c index dc05440..d581b97 100644 --- a/gdb/proc-service.c +++ b/gdb/proc-service.c @@ -258,7 +258,7 @@ ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, prgregset_t gregset) struct regcache *regcache; inferior_ptid = BUILD_LWP (lwpid, ptid_get_pid (ph->ptid)); - regcache = get_thread_regcache (inferior_ptid); + regcache = get_thread_arch_regcache (inferior_ptid, target_gdbarch); target_fetch_registers (regcache, -1); fill_gregset (regcache, (gdb_gregset_t *) gregset, -1); @@ -277,7 +277,7 @@ ps_lsetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, const prgregset_t gregset) struct regcache *regcache; inferior_ptid = BUILD_LWP (lwpid, ptid_get_pid (ph->ptid)); - regcache = get_thread_regcache (inferior_ptid); + regcache = get_thread_arch_regcache (inferior_ptid, target_gdbarch); supply_gregset (regcache, (const gdb_gregset_t *) gregset); target_store_registers (regcache, -1); @@ -297,7 +297,7 @@ ps_lgetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, struct regcache *regcache; inferior_ptid = BUILD_LWP (lwpid, ptid_get_pid (ph->ptid)); - regcache = get_thread_regcache (inferior_ptid); + regcache = get_thread_arch_regcache (inferior_ptid, target_gdbarch); target_fetch_registers (regcache, -1); fill_fpregset (regcache, (gdb_fpregset_t *) fpregset, -1); @@ -317,7 +317,7 @@ ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, struct regcache *regcache; inferior_ptid = BUILD_LWP (lwpid, ptid_get_pid (ph->ptid)); - regcache = get_thread_regcache (inferior_ptid); + regcache = get_thread_arch_regcache (inferior_ptid, target_gdbarch); supply_fpregset (regcache, (const gdb_fpregset_t *) fpregset); target_store_registers (regcache, -1); |