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
This commit is contained in:
Kyle Galloway 2007-05-17 18:53:10 +00:00 committed by Kyle Galloway
parent 538639f4ab
commit 769b6cc605
2 changed files with 13 additions and 1 deletions

View 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.

View 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;
}