OSDN Git Service

Fix JDWP Virtualmachine.Resume command
authorSebastien Hertz <shertz@google.com>
Tue, 14 Oct 2014 15:27:15 +0000 (17:27 +0200)
committerSebastien Hertz <shertz@google.com>
Mon, 27 Oct 2014 09:31:39 +0000 (10:31 +0100)
commit4eec026ec4d86869baa27ad0afd9564cca8856c9
tree5fd589ab62118751e99a6e9c708d895666adb3b5
parent506794738de41db046a8094e04aa2a7c5a6e02db
Fix JDWP Virtualmachine.Resume command

We used to call ThreadList::UndoDebuggerSuspensions but this is not
correct. Indeed Virtualmachine.Resume command should be performed
as many times as all threads have been suspended (either by the
Virtualmachine.Suspend command or the application of suspend policy
ALL for event).

This CL fixes this issue by adding ThreadList::ResumeAllForDebugger.
It decrements suspend count and debug suspend count by 1 (globally
and for each thread).

It also handles the case where Virtualmachine.Resume is called while
threads have not been suspended (global debug suspend count is 0). In
this case we just print a warning and do nothing.

Bug: 17974047

(cherry picked from commit 253fa555d9424a56c52879449eabe73d5c96cf61)

Change-Id: I38b38240f84f141670506e88fa5c2480f856fdd6
runtime/debugger.cc
runtime/debugger.h
runtime/thread_list.cc
runtime/thread_list.h