* gnu/classpath/jdwp/natVMVirtualMachine.cc
authorKeith Seitz <keiths@redhat.com>
Tue, 23 Jan 2007 06:40:49 +0000 (06:40 +0000)
committerKeith Seitz <kseitz@gcc.gnu.org>
Tue, 23 Jan 2007 06:40:49 +0000 (06:40 +0000)
        (getClassMethod): Implement.

From-SVN: r121078

libjava/ChangeLog
libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc

index ff434f80d4c5d2e997bacdf6ca357f75fd5c8166..5ab17892b40421b02c03ee1a3d847262f34bd572 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-22  Keith Seitz  <keiths@redhat.com>
+
+       * gnu/classpath/jdwp/natVMVirtualMachine.cc
+       (getClassMethod): Implement.
+
 2007-01-22  Keith  Seitz  <keiths@redhat.com>
 
        * java/lang/Class.h (_Jv_GetClassStatus): Declare.
index 8c599fb2e6899807a3b3d1f6d28a071b72efc784..84b75ec386cfa088eea78d9dd4435888bedca15b 100644 (file)
@@ -30,6 +30,7 @@ details. */
 #include <gnu/classpath/jdwp/VMVirtualMachine.h>
 #include <gnu/classpath/jdwp/event/EventRequest.h>
 #include <gnu/classpath/jdwp/event/VmInitEvent.h>
+#include <gnu/classpath/jdwp/exception/InvalidMethodException.h>
 #include <gnu/classpath/jdwp/exception/JdwpInternalErrorException.h>
 #include <gnu/classpath/jdwp/util/MethodResult.h>
 
@@ -307,9 +308,14 @@ getAllClassMethods (MAYBE_UNUSED jclass klass)
 
 gnu::classpath::jdwp::VMMethod *
 gnu::classpath::jdwp::VMVirtualMachine::
-getClassMethod (MAYBE_UNUSED jclass klass, MAYBE_UNUSED jlong id)
+getClassMethod (jclass klass, jlong id)
 {
-  return NULL;
+  jmethodID method = reinterpret_cast<jmethodID> (id);
+  _Jv_MethodBase *bmeth = _Jv_FindInterpreterMethod (klass, method);
+  if (bmeth != NULL)
+    return new gnu::classpath::jdwp::VMMethod (klass, id);
+
+  throw new gnu::classpath::jdwp::exception::InvalidMethodException (id);
 }
 
 java::util::ArrayList *