aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-06-29 18:27:23 +0000
committerPedro Alves <palves@redhat.com>2009-06-29 18:27:23 +0000
commit173853dc66b58323cfb6a504fab77f7fb8f73c92 (patch)
tree4511b161ba11472d2b822a476ac5958d038c217c /gdb/infrun.c
parent7ab9ffdd43ed1efdb44418fa003e316b5e099ec7 (diff)
downloadgdb-173853dc66b58323cfb6a504fab77f7fb8f73c92.zip
gdb-173853dc66b58323cfb6a504fab77f7fb8f73c92.tar.gz
gdb-173853dc66b58323cfb6a504fab77f7fb8f73c92.tar.bz2
* infrun.c (handle_inferior_event): Context switch to the new
thread when resuming for a new_thread_event.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index a2ab386..45a8c87 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2746,6 +2746,8 @@ targets should add new threads to the thread list themselves in non-stop mode.")
in either the OS or the native code). Therefore we need to
continue all threads in order to make progress. */
+ if (!ptid_equal (ecs->ptid, inferior_ptid))
+ context_switch (ecs->ptid);
target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
prepare_to_wait (ecs);
return;