Commit ddd3985e by Kyle Galloway Committed by Kyle Galloway

natVMVirtualMachine.cc (getClassMethod): Change to use JVMTI.

2007-05-04  Kyle Galloway  <kgallowa@redhat.com>

	* gnu/classpath/jdwp/natVMVirtualMachine.cc (getClassMethod): Change
	to use JVMTI.

From-SVN: r124447
parent 640afd95
2007-05-04 Kyle Galloway <kgallowa@redhat.com>
* gnu/classpath/jdwp/natVMVirtualMachine.cc (getClassMethod): Change
to use JVMTI.
2007-05-03 Keith Seitz <keiths@redhat.com> 2007-05-03 Keith Seitz <keiths@redhat.com>
* interpret.cc: Don't include ExceptionEvent.h. * interpret.cc: Don't include ExceptionEvent.h.
......
...@@ -510,12 +510,25 @@ gnu::classpath::jdwp::VMMethod * ...@@ -510,12 +510,25 @@ gnu::classpath::jdwp::VMMethod *
gnu::classpath::jdwp::VMVirtualMachine:: gnu::classpath::jdwp::VMVirtualMachine::
getClassMethod (jclass klass, jlong id) getClassMethod (jclass klass, jlong id)
{ {
jmethodID method = reinterpret_cast<jmethodID> (id); jint count;
_Jv_MethodBase *bmeth = _Jv_FindInterpreterMethod (klass, method); jmethodID *methods;
if (bmeth != NULL) jvmtiError err = _jdwp_jvmtiEnv->GetClassMethods (klass, &count, &methods);
return new gnu::classpath::jdwp::VMMethod (klass, id); if (err != JVMTI_ERROR_NONE)
throw_jvmti_error (err);
jmethodID meth_id = reinterpret_cast<jmethodID> (id);
using namespace gnu::classpath::jdwp;
// Check if this method is defined for the given class and if so return a
// VMMethod representing it.
for (int i = 0; i < count; i++)
{
if (methods[i] == meth_id)
return new VMMethod (klass, reinterpret_cast<jlong> (meth_id));
}
throw new gnu::classpath::jdwp::exception::InvalidMethodException (id); throw new exception::InvalidMethodException (id);
} }
java::util::ArrayList * java::util::ArrayList *
......
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