Commit 078b3073 by Keith Seitz Committed by Keith Seitz

prims.cc (_Jv_RunMain): Send JVMTI event notifications for VM_INIT and VM_DEATH…

prims.cc (_Jv_RunMain): Send JVMTI event notifications for VM_INIT and VM_DEATH instead of the JDWP...

        * prims.cc (_Jv_RunMain): Send JVMTI event notifications
        for VM_INIT and VM_DEATH instead of the JDWP notifications.

From-SVN: r121143
parent c65110e4
2007-01-24 Keith Seitz <keiths@redhat.com> 2007-01-24 Keith Seitz <keiths@redhat.com>
* prims.cc (_Jv_RunMain): Send JVMTI event notifications
for VM_INIT and VM_DEATH instead of the JDWP notifications.
2007-01-24 Keith Seitz <keiths@redhat.com>
* gnu/classpath/jdwp/natVMVirtualMachine.cc * gnu/classpath/jdwp/natVMVirtualMachine.cc
(getAllClassMethods): Implement. (getAllClassMethods): Implement.
......
...@@ -32,6 +32,9 @@ details. */ ...@@ -32,6 +32,9 @@ details. */
#include <java/lang/ThreadGroup.h> #include <java/lang/ThreadGroup.h>
#endif #endif
#include <jvmti.h>
#include "jvmti-int.h"
#ifndef DISABLE_GETENV_PROPERTIES #ifndef DISABLE_GETENV_PROPERTIES
#include <ctype.h> #include <ctype.h>
#include <java-props.h> #include <java-props.h>
...@@ -66,8 +69,6 @@ details. */ ...@@ -66,8 +69,6 @@ details. */
#include <execution.h> #include <execution.h>
#include <gnu/classpath/jdwp/Jdwp.h> #include <gnu/classpath/jdwp/Jdwp.h>
#include <gnu/classpath/jdwp/VMVirtualMachine.h> #include <gnu/classpath/jdwp/VMVirtualMachine.h>
#include <gnu/classpath/jdwp/event/VmDeathEvent.h>
#include <gnu/classpath/jdwp/event/VmInitEvent.h>
#include <gnu/java/lang/MainThread.h> #include <gnu/java/lang/MainThread.h>
#ifdef USE_LTDL #ifdef USE_LTDL
...@@ -1583,10 +1584,9 @@ _Jv_RunMain (JvVMInitArgs *vm_args, jclass klass, const char *name, int argc, ...@@ -1583,10 +1584,9 @@ _Jv_RunMain (JvVMInitArgs *vm_args, jclass klass, const char *name, int argc,
jdwp->join (); jdwp->join ();
} }
// Send VmInit // Send VMInit
gnu::classpath::jdwp::event::VmInitEvent *event; if (JVMTI_REQUESTED_EVENT (VMInit))
event = new gnu::classpath::jdwp::event::VmInitEvent (main_thread); _Jv_JVMTI_PostEvent (JVMTI_EVENT_VM_INIT, main_thread);
gnu::classpath::jdwp::Jdwp::notify (event);
} }
catch (java::lang::Throwable *t) catch (java::lang::Throwable *t)
{ {
...@@ -1601,12 +1601,12 @@ _Jv_RunMain (JvVMInitArgs *vm_args, jclass klass, const char *name, int argc, ...@@ -1601,12 +1601,12 @@ _Jv_RunMain (JvVMInitArgs *vm_args, jclass klass, const char *name, int argc,
_Jv_ThreadRun (main_thread); _Jv_ThreadRun (main_thread);
// Notify debugger of VM's death // Send VMDeath
if (gnu::classpath::jdwp::Jdwp::isDebugging) if (JVMTI_REQUESTED_EVENT (VMDeath))
{ {
using namespace gnu::classpath::jdwp; java::lang::Thread *thread = java::lang::Thread::currentThread ();
event::VmDeathEvent *event = new event::VmDeathEvent (); JNIEnv *jni_env = _Jv_GetCurrentJNIEnv ();
Jdwp::notify (event); _Jv_JVMTI_PostEvent (JVMTI_EVENT_VM_DEATH, thread, jni_env);
} }
// If we got here then something went wrong, as MainThread is not // If we got here then something went wrong, as MainThread is not
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment