diff options
-rw-r--r-- | base/logging.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/base/logging.cc b/base/logging.cc index 8db5740..8d1c8f8 100644 --- a/base/logging.cc +++ b/base/logging.cc @@ -46,6 +46,7 @@ typedef pthread_mutex_t* MutexHandle; #include "base/base_switches.h" #include "base/command_line.h" +#include "base/debug/alias.h" #include "base/debug/debugger.h" #include "base/debug/stack_trace.h" #include "base/eintr_wrapper.h" @@ -636,6 +637,12 @@ LogMessage::~LogMessage() { } if (severity_ == LOG_FATAL) { + // Ensure the first characters of the string are on the stack so they + // are contained in minidumps for diagnostic purposes. + char str_stack[1024]; + str_newline.copy(str_stack, arraysize(str_stack)); + base::debug::Alias(str_stack); + // display a message or break into the debugger on a fatal error if (base::debug::BeingDebugged()) { base::debug::BreakDebugger(); |