aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-07-02 17:06:44 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-07-02 17:06:44 +0000
commitc2250ad1c4567fd2235cb4131f7cb7c06da3769a (patch)
treed8d42b063e218071644ff3c7c9bcb30b9cdd12d4 /gdb/target.h
parentd452c4bcefbbe7b2305a5ce26469e06d940a690c (diff)
downloadgdb-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/target.h')
-rw-r--r--gdb/target.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 89d99bb..2434a64 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -542,6 +542,9 @@ struct target_ops
simultaneously? */
int (*to_supports_multi_process) (void);
+ /* Determine current architecture of thread PTID. */
+ struct gdbarch *(*to_thread_architecture) (struct target_ops *, ptid_t);
+
int to_magic;
/* Need sub-structure for target machine related rather than comm related?
*/
@@ -1039,6 +1042,11 @@ extern char *normal_pid_to_str (ptid_t ptid);
#define target_pid_to_exec_file(pid) \
(current_target.to_pid_to_exec_file) (pid)
+/* Determine current architecture of thread PTID. */
+
+#define target_thread_architecture(ptid) \
+ (current_target.to_thread_architecture (&current_target, ptid))
+
/*
* Iterator function for target memory regions.
* Calls a callback function once for each memory region 'mapped'