summaryrefslogtreecommitdiff
path: root/libjava/interpret.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/interpret.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/interpret.cc')
-rw-r--r--libjava/interpret.cc41
1 files changed, 23 insertions, 18 deletions
diff --git a/libjava/interpret.cc b/libjava/interpret.cc
index 7e694a392a1..7e7d36d4e01 100644
--- a/libjava/interpret.cc
+++ b/libjava/interpret.cc
@@ -1297,34 +1297,34 @@ _Jv_InterpMethod::ncode ()
{
if (staticp)
{
- if (::gnu::classpath::jdwp::Jdwp::isDebugging)
- fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_class_debug;
- else
- fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_class;
+ if (JVMTI::enabled)
+ fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_class_debug;
+ else
+ fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_class;
}
else
{
- if (::gnu::classpath::jdwp::Jdwp::isDebugging)
- fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_object_debug;
- else
- fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_object;
- }
+ if (JVMTI::enabled)
+ fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_object_debug;
+ else
+ fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_object;
+ }
}
else
{
if (staticp)
{
- if (::gnu::classpath::jdwp::Jdwp::isDebugging)
- fun = (ffi_closure_fun)&_Jv_InterpMethod::run_class_debug;
- else
- fun = (ffi_closure_fun)&_Jv_InterpMethod::run_class;
+ if (JVMTI::enabled)
+ fun = (ffi_closure_fun)&_Jv_InterpMethod::run_class_debug;
+ else
+ fun = (ffi_closure_fun)&_Jv_InterpMethod::run_class;
}
else
{
- if (::gnu::classpath::jdwp::Jdwp::isDebugging)
- fun = (ffi_closure_fun)&_Jv_InterpMethod::run_normal_debug;
- else
- fun = (ffi_closure_fun)&_Jv_InterpMethod::run_normal;
+ if (JVMTI::enabled)
+ fun = (ffi_closure_fun)&_Jv_InterpMethod::run_normal_debug;
+ else
+ fun = (ffi_closure_fun)&_Jv_InterpMethod::run_normal;
}
}
@@ -1680,7 +1680,12 @@ void
_Jv_CompileMethod (_Jv_InterpMethod* method)
{
if (method->prepared == NULL)
- _Jv_InterpMethod::run (NULL, NULL, method);
+ {
+ if (JVMTI::enabled)
+ _Jv_InterpMethod::run_debug (NULL, NULL, method);
+ else
+ _Jv_InterpMethod::run (NULL, NULL, method);
+ }
}
#endif // DIRECT_THREADED