diff options
author | Keith Seitz <keiths@redhat.com> | 2007-02-20 14:08:49 +0000 |
---|---|---|
committer | Keith Seitz <kseitz@gcc.gnu.org> | 2007-02-20 14:08:49 +0000 |
commit | cc0c8dbc9363a9355c3ab81588b583f1a49a58b0 (patch) | |
tree | 926142250467aeba8eba42681cdc02cfadf2d399 /libjava/gnu | |
parent | 0c0d910d23a3b8533fe11c98b10b19f5e79b446e (diff) | |
download | gcc-cc0c8dbc9363a9355c3ab81588b583f1a49a58b0.zip gcc-cc0c8dbc9363a9355c3ab81588b583f1a49a58b0.tar.gz gcc-cc0c8dbc9363a9355c3ab81588b583f1a49a58b0.tar.bz2 |
* gnu/classpath/jdwp/natVMVirtualMachine.cc
(jdwpClassPrepareCB): Move class status stuff to ...
(getClassStatus): ... here.
From-SVN: r122164
Diffstat (limited to 'libjava/gnu')
-rw-r--r-- | libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc b/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc index c47d440..3ea5f9a 100644 --- a/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc +++ b/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc @@ -453,9 +453,25 @@ gnu::classpath::jdwp::VMVirtualMachine::getAllLoadedClasses (void) jint gnu::classpath::jdwp::VMVirtualMachine:: -getClassStatus (MAYBE_UNUSED jclass klass) +getClassStatus (jclass klass) { - return 0; + jint flags = 0; + jvmtiError err = _jdwp_jvmtiEnv->GetClassStatus (klass, &flags); + if (err != JVMTI_ERROR_NONE) + throw_jvmti_error (err); + + using namespace gnu::classpath::jdwp::event; + jint status = 0; + if (flags & JVMTI_CLASS_STATUS_VERIFIED) + status |= ClassPrepareEvent::STATUS_VERIFIED; + if (flags & JVMTI_CLASS_STATUS_PREPARED) + status |= ClassPrepareEvent::STATUS_PREPARED; + if (flags & JVMTI_CLASS_STATUS_ERROR) + status |= ClassPrepareEvent::STATUS_ERROR; + if (flags & JVMTI_CLASS_STATUS_INITIALIZED) + status |= ClassPrepareEvent::STATUS_INITIALIZED; + + return status; } JArray<gnu::classpath::jdwp::VMMethod *> * @@ -812,27 +828,12 @@ jdwpBreakpointCB (jvmtiEnv *env, MAYBE_UNUSED JNIEnv *jni_env, } static void JNICALL -jdwpClassPrepareCB (jvmtiEnv *env, MAYBE_UNUSED JNIEnv *jni_env, +jdwpClassPrepareCB (MAYBE_UNUSED jvmtiEnv *env, MAYBE_UNUSED JNIEnv *jni_env, jthread thread, jclass klass) { using namespace gnu::classpath::jdwp; - jint flags = 0; - jvmtiError err = env->GetClassStatus (klass, &flags); - if (err != JVMTI_ERROR_NONE) - throw_jvmti_error (err); - - using namespace gnu::classpath::jdwp::event; - jint status = 0; - if (flags & JVMTI_CLASS_STATUS_VERIFIED) - status |= ClassPrepareEvent::STATUS_VERIFIED; - if (flags & JVMTI_CLASS_STATUS_PREPARED) - status |= ClassPrepareEvent::STATUS_PREPARED; - if (flags & JVMTI_CLASS_STATUS_ERROR) - status |= ClassPrepareEvent::STATUS_ERROR; - if (flags & JVMTI_CLASS_STATUS_INITIALIZED) - status |= ClassPrepareEvent::STATUS_INITIALIZED; - + jint status = VMVirtualMachine::getClassStatus (klass); event::ClassPrepareEvent *event = new event::ClassPrepareEvent (thread, klass, status); Jdwp::notify (event); |