summaryrefslogtreecommitdiffstats
path: root/runtime/debugger.h
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2015-04-08 16:42:38 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-08 16:42:39 +0000
commita2d40be3e64b339c6c39d59655507c597251e506 (patch)
tree011137a2bb46a6bc56e9b47c0e5c9d7978aa8ace /runtime/debugger.h
parent9d0ab6f0a2f08c3fa9a59e0b8742cf366d7d0feb (diff)
parent4e5b20863898006ec6c9d120cda167d38dda6e60 (diff)
downloadart-a2d40be3e64b339c6c39d59655507c597251e506.zip
art-a2d40be3e64b339c6c39d59655507c597251e506.tar.gz
art-a2d40be3e64b339c6c39d59655507c597251e506.tar.bz2
Merge "Fix JDWP race at runtime shutdown"
Diffstat (limited to 'runtime/debugger.h')
-rw-r--r--runtime/debugger.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/runtime/debugger.h b/runtime/debugger.h
index 5898784..dd7f9c5 100644
--- a/runtime/debugger.h
+++ b/runtime/debugger.h
@@ -239,7 +239,9 @@ class Dbg {
static void GoActive()
LOCKS_EXCLUDED(Locks::breakpoint_lock_, Locks::deoptimization_lock_, Locks::mutator_lock_);
static void Disconnected() LOCKS_EXCLUDED(Locks::deoptimization_lock_, Locks::mutator_lock_);
- static void Disposed();
+ static void Dispose() {
+ gDisposed = true;
+ }
// Returns true if we're actually debugging with a real debugger, false if it's
// just DDMS (or nothing at all).
@@ -255,9 +257,12 @@ class Dbg {
// Returns true if a method has any breakpoints.
static bool MethodHasAnyBreakpoints(mirror::ArtMethod* method)
- SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) LOCKS_EXCLUDED(Locks::breakpoint_lock_);
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
+ LOCKS_EXCLUDED(Locks::breakpoint_lock_);
- static bool IsDisposed();
+ static bool IsDisposed() {
+ return gDisposed;
+ }
/*
* Time, in milliseconds, since the last debugger activity. Does not
@@ -756,6 +761,10 @@ class Dbg {
// Indicates whether the debugger is making requests.
static bool gDebuggerActive;
+ // Indicates whether we should drop the JDWP connection because the runtime stops or the
+ // debugger called VirtualMachine.Dispose.
+ static bool gDisposed;
+
// The registry mapping objects to JDWP ids.
static ObjectRegistry* gRegistry;