aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog4
-rw-r--r--gdb/gdbserver/inferiors.c9
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index ae458e2..840cf79 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,9 @@
2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
+ * inferiors.c (switch_to_thread): New function.
+
+2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
+
* Makefile.in (SFILE): Add "common/job-control.c".
(OBS): Add "job-control.o".
diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c
index b65a726..5a4a0d1 100644
--- a/gdb/gdbserver/inferiors.c
+++ b/gdb/gdbserver/inferiors.c
@@ -468,3 +468,12 @@ make_cleanup_restore_current_thread (void)
{
return make_cleanup (do_restore_current_thread_cleanup, current_thread);
}
+
+/* See common/common-gdbthread.h. */
+
+void
+switch_to_thread (ptid_t ptid)
+{
+ if (!ptid_equal (ptid, minus_one_ptid))
+ current_thread = find_thread_ptid (ptid);
+}