OSDN Git Service

Log the process memory maps on host SIGSEGV.
authorHiroshi Yamauchi <yamauchi@google.com>
Sat, 23 May 2015 01:15:10 +0000 (18:15 -0700)
committerHiroshi Yamauchi <yamauchi@google.com>
Sat, 23 May 2015 01:15:10 +0000 (18:15 -0700)
Bug: 19894268
Change-Id: Ib35f858de2519e24422a2ed19c68cfbdfd4173b3

runtime/runtime_linux.cc

index d65e18e..f0b3c4e 100644 (file)
@@ -340,6 +340,9 @@ void HandleUnexpectedSignal(int signal_number, siginfo_t* info, void* raw_contex
                       << "Thread: " << tid << " \"" << thread_name << "\"\n"
                       << "Registers:\n" << Dumpable<UContext>(thread_context) << "\n"
                       << "Backtrace:\n" << Dumpable<Backtrace>(thread_backtrace);
+  if (kIsDebugBuild && signal_number == SIGSEGV) {
+    PrintFileToLog("/proc/self/maps", LogSeverity::INTERNAL_FATAL);
+  }
   Runtime* runtime = Runtime::Current();
   if (runtime != nullptr) {
     if (IsTimeoutSignal(signal_number)) {