diff options
Diffstat (limited to 'runtime/jdwp/jdwp_event.cc')
-rw-r--r-- | runtime/jdwp/jdwp_event.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/jdwp/jdwp_event.cc b/runtime/jdwp/jdwp_event.cc index 677b04b..427350e 100644 --- a/runtime/jdwp/jdwp_event.cc +++ b/runtime/jdwp/jdwp_event.cc @@ -689,6 +689,11 @@ void JdwpState::EventFinish(ExpandBuf* pReq) { Set1(buf+9, kJdwpEventCommandSet); Set1(buf+10, kJdwpCompositeCommand); + // Prevents from interleaving commands and events. Otherwise we could end up in sending an event + // before sending the reply of the command being processed and would lead to bad synchronization + // between the debugger and the debuggee. + WaitForProcessingRequest(); + SendRequest(pReq); expandBufFree(pReq); |