Index: runtime/vm/profiler.cc |
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc |
index 3059a2040df7d085f10221e907d6e8e0cc92fcc5..3dc4c8faf53da444e6e3e71170ac250c6c59d92c 100644 |
--- a/runtime/vm/profiler.cc |
+++ b/runtime/vm/profiler.cc |
@@ -1035,7 +1035,7 @@ static bool CheckIsolate(Isolate* isolate) { |
} |
void Profiler::DumpStackTrace(void* context) { |
-#if defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS) |
+#if defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS) || defined(HOST_OS_ANDROID) |
ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context); |
mcontext_t mcontext = ucontext->uc_mcontext; |
uword pc = SignalHandler::GetProgramCounter(mcontext); |
@@ -1085,12 +1085,14 @@ void Profiler::DumpStackTrace(uword sp, uword fp, uword pc, bool for_crash) { |
Thread* thread = Thread::Current(); |
if (thread == NULL) { |
+ OS::PrintErr("Stack dump aborted because no current Dart thread.\n"); |
return; |
} |
OSThread* os_thread = thread->os_thread(); |
ASSERT(os_thread != NULL); |
Isolate* isolate = thread->isolate(); |
if (!CheckIsolate(isolate)) { |
+ OS::PrintErr("Stack dump aborted because CheckIsolate.\n"); |
siva
2017/07/27 01:09:52
"...... CheckIsolate failed.\n"
rmacnak
2017/07/27 01:23:27
Done, and similar messages below.
|
return; |
} |