summaryrefslogtreecommitdiffstats
path: root/dalvik
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2009-07-31 13:54:59 -0700
committerAndy McFadden <fadden@android.com>2009-07-31 13:54:59 -0700
commitcd9ef3b60c1d7500cb25dc811173f58a1607a052 (patch)
treebc23bf1eb1d23dd44c735a59b5e523dab8a45c67 /dalvik
parent148ef8eb9166eb50ce2ab5839515277c00f6cdfc (diff)
downloadlibcore-cd9ef3b60c1d7500cb25dc811173f58a1607a052.zip
libcore-cd9ef3b60c1d7500cb25dc811173f58a1607a052.tar.gz
libcore-cd9ef3b60c1d7500cb25dc811173f58a1607a052.tar.bz2
Added VMDebug.crash() (hidden).
This call prints the stack trace for the current thread, and then crashes the VM so you can see the native stack trace too. Useful for figuring out "how did I get here?" situations.
Diffstat (limited to 'dalvik')
-rw-r--r--dalvik/src/main/java/dalvik/system/VMDebug.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/dalvik/src/main/java/dalvik/system/VMDebug.java b/dalvik/src/main/java/dalvik/system/VMDebug.java
index 06a67b6..bcc8b61 100644
--- a/dalvik/src/main/java/dalvik/system/VMDebug.java
+++ b/dalvik/src/main/java/dalvik/system/VMDebug.java
@@ -282,8 +282,15 @@ public final class VMDebug {
*/
public static native boolean cacheRegisterMap(String classAndMethodDesc);
- /* don't ask */
- static native void printThis(Object thisThing, int count, int thing);
+ /**
+ * Crashes the VM. Seriously. Dumps the stack trace for the current
+ * thread and then aborts the VM so you can see the native stack trace.
+ * Useful for figuring out how you got somewhere when lots of native
+ * code is involved.
+ *
+ * @hide
+ */
+ public static native void crash();
/*
* Fake method, inserted into dmtrace output when the garbage collector