From 173853dc66b58323cfb6a504fab77f7fb8f73c92 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 29 Jun 2009 18:27:23 +0000 Subject: [PATCH] * infrun.c (handle_inferior_event): Context switch to the new thread when resuming for a new_thread_event. --- gdb/ChangeLog | 5 +++++ gdb/infrun.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 18832c6290..934248aa9e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-06-29 Pedro Alves + + * infrun.c (handle_inferior_event): Context switch to the new + thread when resuming for a new_thread_event. + 2009-06-29 Ulrich Weigand * ada-lang.h (ada_convert_actual): Add GDBARCH argument. diff --git a/gdb/infrun.c b/gdb/infrun.c index a2ab386be9..45a8c8778f 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; -- 2.34.1