summaryrefslogtreecommitdiff
path: root/libjava/prims.cc
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2007-01-24 22:44:08 +0000
committerKeith Seitz <kseitz@gcc.gnu.org>2007-01-24 22:44:08 +0000
commit078b307321410f5a8e580df2a4c7dd8e980354b1 (patch)
tree51cf1a2d6840c64f7d39cc95fc745064f8d2de99 /libjava/prims.cc
parentc65110e44cc6aed93ee2e576d864e09a3bea59e3 (diff)
downloadgcc-078b307321410f5a8e580df2a4c7dd8e980354b1.tar.gz
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
Diffstat (limited to 'libjava/prims.cc')
-rw-r--r--libjava/prims.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/libjava/prims.cc b/libjava/prims.cc
index 00d547017f4..e205dbbe521 100644
--- a/libjava/prims.cc
+++ b/libjava/prims.cc
@@ -32,6 +32,9 @@ details. */
#include <java/lang/ThreadGroup.h>
#endif
+#include <jvmti.h>
+#include "jvmti-int.h"
+
#ifndef DISABLE_GETENV_PROPERTIES
#include <ctype.h>
#include <java-props.h>
@@ -66,8 +69,6 @@ details. */
#include <execution.h>
#include <gnu/classpath/jdwp/Jdwp.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>
#ifdef USE_LTDL
@@ -1583,10 +1584,9 @@ _Jv_RunMain (JvVMInitArgs *vm_args, jclass klass, const char *name, int argc,
jdwp->join ();
}
- // Send VmInit
- gnu::classpath::jdwp::event::VmInitEvent *event;
- event = new gnu::classpath::jdwp::event::VmInitEvent (main_thread);
- gnu::classpath::jdwp::Jdwp::notify (event);
+ // Send VMInit
+ if (JVMTI_REQUESTED_EVENT (VMInit))
+ _Jv_JVMTI_PostEvent (JVMTI_EVENT_VM_INIT, main_thread);
}
catch (java::lang::Throwable *t)
{
@@ -1601,12 +1601,12 @@ _Jv_RunMain (JvVMInitArgs *vm_args, jclass klass, const char *name, int argc,
_Jv_ThreadRun (main_thread);
- // Notify debugger of VM's death
- if (gnu::classpath::jdwp::Jdwp::isDebugging)
+ // Send VMDeath
+ if (JVMTI_REQUESTED_EVENT (VMDeath))
{
- using namespace gnu::classpath::jdwp;
- event::VmDeathEvent *event = new event::VmDeathEvent ();
- Jdwp::notify (event);
+ java::lang::Thread *thread = java::lang::Thread::currentThread ();
+ JNIEnv *jni_env = _Jv_GetCurrentJNIEnv ();
+ _Jv_JVMTI_PostEvent (JVMTI_EVENT_VM_DEATH, thread, jni_env);
}
// If we got here then something went wrong, as MainThread is not