diff options
author | Keith Seitz <keiths@redhat.com> | 2006-08-23 22:18:08 +0000 |
---|---|---|
committer | Keith Seitz <kseitz@gcc.gnu.org> | 2006-08-23 22:18:08 +0000 |
commit | a4d0390b4488cc159cb7389b778cc92a504f6796 (patch) | |
tree | b00679f0278930836fd4b79a9858e46b627c3df9 /libjava/gnu | |
parent | 12b3553fe4111b2f095d2397acbddf4d9b019eac (diff) | |
download | gcc-a4d0390b4488cc159cb7389b778cc92a504f6796.zip gcc-a4d0390b4488cc159cb7389b778cc92a504f6796.tar.gz gcc-a4d0390b4488cc159cb7389b778cc92a504f6796.tar.bz2 |
* gnu/classpath/jdwp/VMVirtualMachine.java
(initialize): Declare.
* gnu/classpath/jdwp/natVMVirtualMachine.cc
(initialize): Get and save JVMTI environment.
From-SVN: r116357
Diffstat (limited to 'libjava/gnu')
-rw-r--r-- | libjava/gnu/classpath/jdwp/VMVirtualMachine.java | 2 | ||||
-rw-r--r-- | libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/libjava/gnu/classpath/jdwp/VMVirtualMachine.java b/libjava/gnu/classpath/jdwp/VMVirtualMachine.java index d4985bf..6da1d1d 100644 --- a/libjava/gnu/classpath/jdwp/VMVirtualMachine.java +++ b/libjava/gnu/classpath/jdwp/VMVirtualMachine.java @@ -57,6 +57,8 @@ import java.util.Iterator; */ public class VMVirtualMachine { + public static native void initialize (); + /** * Suspend a thread * diff --git a/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc b/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc index ef4605b..b475c49 100644 --- a/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc +++ b/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc @@ -10,6 +10,8 @@ details. */ #include <config.h> #include <gcj/cni.h> +#include <jvm.h> +#include <jvmti.h> #include <java/lang/Class.h> #include <java/lang/ClassLoader.h> @@ -28,6 +30,16 @@ using namespace java::lang; using namespace gnu::classpath::jdwp::event; using namespace gnu::classpath::jdwp::util; +// JVMTI environment +static jvmtiEnv *_jdwp_jvmtiEnv; + +void +gnu::classpath::jdwp::VMVirtualMachine::initialize () +{ + JavaVM *vm = _Jv_GetJavaVM (); + vm->GetEnv (reinterpret_cast<void **> (&_jdwp_jvmtiEnv), JVMTI_VERSION_1_0); +} + void gnu::classpath::jdwp::VMVirtualMachine ::suspendThread (Thread *thread) { |