Fix GetCurrentMethod to cope with callee-save frames.
We want to report something like this:
Aborting because JNI app bug detected (see above for details)
in call to Throw
from Main.throwNullPointerException()V
Rather than something like this:
Aborting because JNI app bug detected (see above for details)
in call to Throw
from java.lang.reflect.Method.$$$callee_save_method$$$()V
Change-Id: I84491c315dc0f114da1ab1fd9f191b5d04daf76e
diff --git a/src/thread.h b/src/thread.h
index 8fd0985..74e6f83 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -233,9 +233,7 @@
// Returns the Method* for the current method.
// This is used by the JNI implementation for logging and diagnostic purposes.
- const Method* GetCurrentMethod() const {
- return top_of_managed_stack_.GetMethod();
- }
+ const Method* GetCurrentMethod() const;
bool IsExceptionPending() const {
return exception_ != NULL;