summaryrefslogtreecommitdiff
path: root/libjava/jvmti.cc
diff options
context:
space:
mode:
authorkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-31 23:25:39 +0000
committerkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-31 23:25:39 +0000
commit3853513aa6e0061ac98e3fc71221e0b1d348b21f (patch)
treeeb4277ca347ad0027cd2c3b4f8f751b457bc9b47 /libjava/jvmti.cc
parent44db1fbc779ee764c76e46212057aef21725d72c (diff)
downloadgcc-3853513aa6e0061ac98e3fc71221e0b1d348b21f.tar.gz
* include/jvmti-int.h (JVMTI): Declare member "enabled".
* jvmti.cc (JVMTI): Add member "enabled". (_Jv_GetJVMTIEnv): Mark JVMTI enabled. * interpret.cc (_Jv_InterpMethod::ncode): Use JVMTI::enabled instead of gnu::classpath::jdwp::Jdwp::isDebugging. (_Jv_CompileMethod): If JVMTI is enabled, use run_debug instead of run to compile the method. * interpret-run.cc [DEBUG] (NEXT_INSN): Add JVMTI single step notification. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121442 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/jvmti.cc')
-rw-r--r--libjava/jvmti.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/libjava/jvmti.cc b/libjava/jvmti.cc
index c9c7e7ba731..2e32634b202 100644
--- a/libjava/jvmti.cc
+++ b/libjava/jvmti.cc
@@ -44,6 +44,10 @@ static void check_enabled_event (jvmtiEvent);
namespace JVMTI
{
+ // Is JVMTI enabled? (i.e., any jvmtiEnv created?)
+ bool enabled;
+
+ // Event notifications
bool VMInit = false;
bool VMDeath = false;
bool ThreadStart = false;
@@ -1754,6 +1758,10 @@ _Jv_GetJVMTIEnv (void)
}
}
+ /* Mark JVMTI active. This is used to force the interpreter
+ to use either debugging or non-debugging code. Once JVMTI
+ has been enabled, the non-debug interpreter cannot be used. */
+ JVMTI::enabled = true;
return env;
}