summaryrefslogtreecommitdiffstats
path: root/runtime/jdwp
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2015-02-26 06:17:12 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-02-26 06:17:13 +0000
commitff9b747588e77f04b07dc76b2d39a82cbfc60441 (patch)
tree5daf6478955d0f3c38cb10a4864bb8564b20ee97 /runtime/jdwp
parentf16fe893139345dad8b05b3db3e717c6f8d079d0 (diff)
parent813b9602dadeabf33439cb0592072744f6241ce5 (diff)
downloadart-ff9b747588e77f04b07dc76b2d39a82cbfc60441.tar.gz
art-ff9b747588e77f04b07dc76b2d39a82cbfc60441.tar.bz2
art-ff9b747588e77f04b07dc76b2d39a82cbfc60441.zip
Merge "JDWP: fix thread state on event suspension"
Diffstat (limited to 'runtime/jdwp')
-rw-r--r--runtime/jdwp/jdwp_event.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/jdwp/jdwp_event.cc b/runtime/jdwp/jdwp_event.cc
index b71f6cdfc4..fc08d23274 100644
--- a/runtime/jdwp/jdwp_event.cc
+++ b/runtime/jdwp/jdwp_event.cc
@@ -633,7 +633,11 @@ void JdwpState::SendRequestAndPossiblySuspend(ExpandBuf* pReq, JdwpSuspendPolicy
AcquireJdwpTokenForEvent(threadId);
}
EventFinish(pReq);
- SuspendByPolicy(suspend_policy, thread_self_id);
+ {
+ // Before suspending, we change our state to kSuspended so the debugger sees us as RUNNING.
+ ScopedThreadStateChange stsc(self, kSuspended);
+ SuspendByPolicy(suspend_policy, thread_self_id);
+ }
self->TransitionFromSuspendedToRunnable();
}