Add -Xcheck:jni.
I think this is as complete as possible right now. The remaining
two #if 0 sections require:
1. a way to get the Method* of the current native method.
2. a way to get the Class* of the type of a given Field*.
Change-Id: I331586022095fb36ccc10c9ac1890a59a9224d01
diff --git a/src/utils.cc b/src/utils.cc
index 84b1556..695cbb3 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -84,6 +84,16 @@
return result;
}
+std::string PrettyField(const Field* f) {
+ if (f == NULL) {
+ return "null";
+ }
+ std::string result(PrettyDescriptor(f->GetDeclaringClass()->GetDescriptor()));
+ result += '.';
+ result += f->GetName()->ToModifiedUtf8();
+ return result;
+}
+
std::string PrettyMethod(const Method* m, bool with_signature) {
if (m == NULL) {
return "null";