Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: base/logging.cc

Issue 2312393002: Debug exit code (Closed)
Patch Set: abort instead of int3 Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/stack_trace_posix.cc ('k') | base/process/kill_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.cc
diff --git a/base/logging.cc b/base/logging.cc
index 0771b47c182e5c18c868f1124a0784bf411d74a9..d4c2dab0a8896235d0a8ecbdc8dc031bdac552a0 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -722,6 +722,9 @@ LogMessage::~LogMessage() {
}
if (severity_ == LOG_FATAL) {
+ fprintf(stderr, "FATAL\n");
+ fflush(stderr);
+
// Ensure the first characters of the string are on the stack so they
// are contained in minidumps for diagnostic purposes.
char str_stack[1024];
@@ -731,6 +734,8 @@ LogMessage::~LogMessage() {
if (log_assert_handler) {
// Make a copy of the string for the handler out of paranoia.
log_assert_handler(std::string(stream_.str()));
+ fprintf(stderr, "log_assert_handler\n");
+ fflush(stderr);
} else {
// Don't use the string with the newline, get a fresh version to send to
// the debug message process. We also don't display assertions to the
@@ -745,6 +750,8 @@ LogMessage::~LogMessage() {
}
#endif
// Crash the process to generate a dump.
+ fprintf(stderr, "Call BreakDebugger\n");
+ fflush(stderr);
base::debug::BreakDebugger();
}
}
« no previous file with comments | « base/debug/stack_trace_posix.cc ('k') | base/process/kill_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698