diff options
author | Pedro Alves <palves@redhat.com> | 2010-05-01 15:56:52 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-05-01 15:56:52 +0000 |
commit | 4d53310308f52cff5131a2d9a8012fe60f6ee2f8 (patch) | |
tree | 29c44867dd3e2f727becb67c02fb68be411e48d9 /gdb/infrun.c | |
parent | 1e7fc18c9c8e6e06e38ecc80ba3cbb65e3ef06a8 (diff) | |
download | gdb-4d53310308f52cff5131a2d9a8012fe60f6ee2f8.zip gdb-4d53310308f52cff5131a2d9a8012fe60f6ee2f8.tar.gz gdb-4d53310308f52cff5131a2d9a8012fe60f6ee2f8.tar.bz2 |
* infrun.c (prepare_for_detach): In non-stop, context switch to
the thread that got the event before handling the event.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 5882cb8..93f50eb 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -2368,6 +2368,14 @@ prepare_for_detach (void) state. */ old_chain_2 = make_cleanup (finish_thread_state_cleanup, &minus_one_ptid); + /* In non-stop mode, each thread is handled individually. + Switch early, so the global state is set correctly for this + thread. */ + if (non_stop + && ecs->ws.kind != TARGET_WAITKIND_EXITED + && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED) + context_switch (ecs->ptid); + /* Now figure out what to do with the result of the result. */ handle_inferior_event (ecs); |