natVMMethod.cc (getModifiers): Check for native classes and mark methods as native...
authorKyle Galloway <kgallowa@redhat.com>
Thu, 17 May 2007 18:53:10 +0000 (18:53 +0000)
committerKyle Galloway <kgallowa@gcc.gnu.org>
Thu, 17 May 2007 18:53:10 +0000 (18:53 +0000)
2007-05-17  Kyle Galloway  <kgallowa@redhat.com>

* gnu/classpath/jdwp/natVMMethod.cc (getModifiers): Check for native
classes and mark methods as native appropriately.

From-SVN: r124807

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

index b4c913b4f521e4aa3bce357cf60f15c0f4b69b41..16b82dc50a31df879386a2da1132c5910f6c06d6 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 76fd0a64168077b5d83d4493aabb59b2c64bf430..1cea54dae9d61b06135f71cf1055f18f5b144bc2 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;
 }