aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-08-18 22:35:17 +0000
committerPedro Alves <palves@redhat.com>2008-08-18 22:35:17 +0000
commit5231c1fd732d8cdb7ed92dd3e275ab4698a8052d (patch)
tree5b0fe57134939c5da0bc46b67bd127b15897d656 /gdb/thread.c
parentf98dfd4b46ff7c68b479181714832b4c5fced87e (diff)
downloadgdb-5231c1fd732d8cdb7ed92dd3e275ab4698a8052d.zip
gdb-5231c1fd732d8cdb7ed92dd3e275ab4698a8052d.tar.gz
gdb-5231c1fd732d8cdb7ed92dd3e275ab4698a8052d.tar.bz2
2008-08-18 Pedro Alves <pedro@codesourcery.com>
gdb/doc/ * observer.texi (thread_ptid_changed): New. gdb/ * gdbthread.h (thread_change_ptid): Declare. * infrun.c (infrun_thread_ptid_changed): New. (_initialize_infrun): Attach infrun_thread_ptid_changed to the thread_ptid_changed observer. * regcache.c (regcache_thread_ptid_changed): New. (_initialize_regcache): Attach regcache_thread_ptid_changed to the thread_ptid_changed observer. * thread.c (thread_change_ptid): New.
Diffstat (limited to 'gdb/thread.c')
-rw-r--r--gdb/thread.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/thread.c b/gdb/thread.c
index f90606c..15da5b6 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -589,6 +589,15 @@ prune_threads (void)
}
void
+thread_change_ptid (ptid_t old_ptid, ptid_t new_ptid)
+{
+ struct thread_info * tp = find_thread_pid (old_ptid);
+ tp->ptid = new_ptid;
+
+ observer_notify_thread_ptid_changed (old_ptid, new_ptid);
+}
+
+void
set_running (ptid_t ptid, int running)
{
struct thread_info *tp;