Commit 6e1f8780 authored by danno@chromium.org's avatar danno@chromium.org

Add flag to always call DebugBreak on abort

R=vegorov@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9706097

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 184b7a89
......@@ -307,6 +307,7 @@ DEFINE_bool(debugger_auto_break, true,
"automatically set the debug break flag when debugger commands are "
"in the queue")
DEFINE_bool(enable_liveedit, true, "enable liveedit experimental feature")
DEFINE_bool(break_on_abort, true, "always cause a debug break before aborting")
// execution.cc
DEFINE_int(stack_size, kPointerSize * 128,
......
......@@ -388,6 +388,9 @@ void OS::Sleep(int milliseconds) {
void OS::Abort() {
// Redirect to std abort to signal abnormal program termination.
if (FLAG_break_on_abort) {
DebugBreak();
}
abort();
}
......
......@@ -961,11 +961,11 @@ void OS::Sleep(int milliseconds) {
void OS::Abort() {
if (!IsDebuggerPresent()) {
if (IsDebuggerPresent() || FLAG_break_on_abort) {
DebugBreak();
} else {
// Make the MSVCRT do a silent abort.
raise(SIGABRT);
} else {
DebugBreak();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment