* [RFA/JDWP] VMVirtualMachine.initialize
@ 2006-08-23 20:09 Keith Seitz
2006-08-23 22:13 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2006-08-23 20:09 UTC (permalink / raw)
To: Java Patch List
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
Hi,
This patch adds an initialize method to classpath's VMVirtualMachine so
that we can save off the JVMTI environment for future use. [Question: Do
I need to add some sort of "LOCAL" comment around it?]
After this, I can finally submit a prims.cc patch to implement JDWP startup.
Keith
ChangeLog
2006-08-23 Keith Seitz <keiths@redhat.com>
* gnu/classpath/jdwp/VMVirtualMachine.java
(initialize): Declare.
* gnu/classpath/jdwp/natVMVirtualMachine.cc
(initialize): Get and save JVMTI environment.
[-- Attachment #2: VMVM-initialize.patch --]
[-- Type: text/x-patch, Size: 1227 bytes --]
Index: gnu/classpath/jdwp/VMVirtualMachine.java
===================================================================
--- gnu/classpath/jdwp/VMVirtualMachine.java (revision 116306)
+++ gnu/classpath/jdwp/VMVirtualMachine.java (working copy)
@@ -57,6 +57,8 @@
*/
public class VMVirtualMachine
{
+ public static native void initialize ();
+
/**
* Suspend a thread
*
Index: gnu/classpath/jdwp/natVMVirtualMachine.cc
===================================================================
--- gnu/classpath/jdwp/natVMVirtualMachine.cc (revision 116306)
+++ gnu/classpath/jdwp/natVMVirtualMachine.cc (working copy)
@@ -10,6 +10,8 @@
#include <config.h>
#include <gcj/cni.h>
+#include <jvm.h>
+#include <jvmti.h>
#include <java/lang/Class.h>
#include <java/lang/ClassLoader.h>
@@ -28,7 +30,17 @@
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)
{
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA/JDWP] VMVirtualMachine.initialize
2006-08-23 20:09 [RFA/JDWP] VMVirtualMachine.initialize Keith Seitz
@ 2006-08-23 22:13 ` Tom Tromey
2006-08-23 22:18 ` Keith Seitz
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2006-08-23 22:13 UTC (permalink / raw)
To: Keith Seitz; +Cc: Java Patch List
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> This patch adds an initialize method to classpath's VMVirtualMachine
Keith> so that we can save off the JVMTI environment for future
Keith> use. [Question: Do I need to add some sort of "LOCAL" comment around
Keith> it?]
You don't need one -- the VM classes are all VM-local by definition.
Keith> After this, I can finally submit a prims.cc patch to implement
Keith> JDWP startup.
Awesome.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA/JDWP] VMVirtualMachine.initialize
2006-08-23 22:13 ` Tom Tromey
@ 2006-08-23 22:18 ` Keith Seitz
0 siblings, 0 replies; 3+ messages in thread
From: Keith Seitz @ 2006-08-23 22:18 UTC (permalink / raw)
To: Java Patch List
Tom Tromey wrote:
>>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
>
> Keith> This patch adds an initialize method to classpath's VMVirtualMachine
> Keith> so that we can save off the JVMTI environment for future
> Keith> use. [Question: Do I need to add some sort of "LOCAL" comment around
> Keith> it?]
>
> You don't need one -- the VM classes are all VM-local by definition.
Done. Thanks.
> Keith> After this, I can finally submit a prims.cc patch to implement
> Keith> JDWP startup.
>
> Awesome.
Coming right up!
Keith
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-08-23 22:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-23 20:09 [RFA/JDWP] VMVirtualMachine.initialize Keith Seitz
2006-08-23 22:13 ` Tom Tromey
2006-08-23 22:18 ` Keith Seitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).