From 769b6cc605916cd81b8ddd52781715c2c9705d19 Mon Sep 17 00:00:00 2001 From: Kyle Galloway Date: Thu, 17 May 2007 18:53:10 +0000 Subject: [PATCH] natVMMethod.cc (getModifiers): Check for native classes and mark methods as native appropriately. 2007-05-17 Kyle Galloway * gnu/classpath/jdwp/natVMMethod.cc (getModifiers): Check for native classes and mark methods as native appropriately. From-SVN: r124807 --- libjava/ChangeLog | 7 ++++++- libjava/gnu/classpath/jdwp/natVMMethod.cc | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index b4c913b4f52..16b82dc50a3 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,4 +1,9 @@ -2007-05-17 Kyle Galloway +2007-05-17 Kyle Galloway + + * gnu/classpath/jdwp/natVMMethod.cc (getModifiers): Check for native + classes and mark methods as native appropriately. + +2007-05-17 Kyle Galloway * gnu/classpath/jdwp/VMFrame.java (): Add parameter for "this" pointer. diff --git a/libjava/gnu/classpath/jdwp/natVMMethod.cc b/libjava/gnu/classpath/jdwp/natVMMethod.cc index 76fd0a64168..1cea54dae9d 100644 --- a/libjava/gnu/classpath/jdwp/natVMMethod.cc +++ b/libjava/gnu/classpath/jdwp/natVMMethod.cc @@ -14,6 +14,7 @@ details. */ #include #include "jvmti-int.h" +#include #include #include #include @@ -65,6 +66,12 @@ gnu::classpath::jdwp::VMMethod::getModifiers () jmethodID method = reinterpret_cast (_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; }