aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorKyle Galloway <kgallowa@redhat.com>2007-05-17 18:53:10 +0000
committerKyle Galloway <kgallowa@gcc.gnu.org>2007-05-17 18:53:10 +0000
commit769b6cc605916cd81b8ddd52781715c2c9705d19 (patch)
treed6c87dd47999aa1805d4ff883e69d49f93804206 /libjava
parent538639f4ab33f1a9f8c347a8f1e2369fdc4989e4 (diff)
downloadgcc-769b6cc605916cd81b8ddd52781715c2c9705d19.zip
gcc-769b6cc605916cd81b8ddd52781715c2c9705d19.tar.gz
gcc-769b6cc605916cd81b8ddd52781715c2c9705d19.tar.bz2
natVMMethod.cc (getModifiers): Check for native classes and mark methods as native appropriately.
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
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog7
-rw-r--r--libjava/gnu/classpath/jdwp/natVMMethod.cc7
2 files changed, 13 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index b4c913b..16b82dc 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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.
diff --git a/libjava/gnu/classpath/jdwp/natVMMethod.cc b/libjava/gnu/classpath/jdwp/natVMMethod.cc
index 76fd0a6..1cea54d 100644
--- a/libjava/gnu/classpath/jdwp/natVMMethod.cc
+++ b/libjava/gnu/classpath/jdwp/natVMMethod.cc
@@ -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;
}