OSDN Git Service

ART: Turn of native stack dump on x86 on-device
authorAndreas Gampe <agampe@google.com>
Fri, 3 Apr 2015 21:36:07 +0000 (14:36 -0700)
committerAndreas Gampe <agampe@google.com>
Fri, 3 Apr 2015 21:36:07 +0000 (14:36 -0700)
Temporary workaround for bug.

Bug: 20040863
Change-Id: Ifdde68c66b94ebc2f13c7983f38700c8bcf41559

runtime/thread.cc

index 9fee779..8a6422d 100644 (file)
@@ -1068,7 +1068,12 @@ void Thread::DumpStack(std::ostream& os) const {
     // 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);
+      // b/20040863. Temporary workaround for x86 libunwind issue.
+#if defined(__i386__) && defined(HAVE_ANDROID_OS)
+      os << "Cannot dump native stack. b/20040863.\n";
+#else
       DumpNativeStack(os, GetTid(), "  native: ", GetCurrentMethod(nullptr, !dump_for_abort));
+#endif
     }
     DumpJavaStack(os);
   } else {