OSDN Git Service

2007-05-17 Kyle Galloway <kgallowa@redhat.com>
authorkgallowa <kgallowa@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 May 2007 18:53:10 +0000 (18:53 +0000)
committerkgallowa <kgallowa@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 May 2007 18:53:10 +0000 (18:53 +0000)
* gnu/classpath/jdwp/natVMMethod.cc (getModifiers): Check for native
classes and mark methods as native appropriately.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124807 138bc75d-0d04-0410-961f-82ee72b054a4

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

index b4c913b..16b82dc 100644 (file)
@@ -1,4 +1,9 @@
-2007-05-17  Kyle Galloway <kgallowa@redhat.com>
+2007-05-17  Kyle Galloway  <kgallowa@redhat.com>
+
+       * gnu/classpath/jdwp/natVMMethod.cc (getModifiers): Check for native
+       classes and mark methods as native appropriately.
+
+2007-05-17  Kyle Galloway  <kgallowa@redhat.com>
 
        * gnu/classpath/jdwp/VMFrame.java (<init>): Add parameter for "this"
        pointer.
index 76fd0a6..1cea54d 100644 (file)
@@ -14,6 +14,7 @@ details.  */
 #include <jvmti.h>
 #include "jvmti-int.h"
 
+#include <java/lang/reflect/Modifier.h>
 #include <gnu/classpath/jdwp/VMMethod.h>
 #include <gnu/classpath/jdwp/exception/AbsentInformationException.h>
 #include <gnu/classpath/jdwp/exception/InvalidMethodException.h>
@@ -65,6 +66,12 @@ gnu::classpath::jdwp::VMMethod::getModifiers ()
   jmethodID method = reinterpret_cast<jmethodID> (_methodId);
   jint flags;
   env->GetMethodModifiers (method, &flags);
+
+  // If this class is compiled, as far as JDWP is concerned, its methods are 
+  // native.  This will set the native flag for these methods.
+  if (!_Jv_IsInterpretedClass (getDeclaringClass ()))
+    flags |= ::java::lang::reflect::Modifier::NATIVE;
+
   return flags;
 }