ART: Avoid recursive abort on thread dump
Also clean up unused variable.
Bug: 15567083
Change-Id: Id83a3784bbe88520a4ffe654b2553d36a7b8e5bc
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 10688ff..9b37eb7 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -942,7 +942,6 @@
std::ostream& os;
const Thread* thread;
const bool can_allocate;
- mirror::ArtMethod* method;
mirror::ArtMethod* last_method;
int last_line_number;
int repetition_count;
@@ -993,7 +992,7 @@
// If we're currently in native code, dump that stack before dumping the managed stack.
if (dump_for_abort || ShouldShowNativeStack(this)) {
DumpKernelStack(os, GetTid(), " kernel: ", false);
- DumpNativeStack(os, GetTid(), " native: ", GetCurrentMethod(nullptr));
+ DumpNativeStack(os, GetTid(), " native: ", GetCurrentMethod(nullptr, !dump_for_abort));
}
DumpJavaStack(os);
} else {