| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/debug/debugger.h" | 5 #include "base/debug/debugger.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <dbghelp.h> | 8 #include <dbghelp.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 } | 98 } |
| 99 | 99 |
| 100 bool BeingDebugged() { | 100 bool BeingDebugged() { |
| 101 return ::IsDebuggerPresent() != 0; | 101 return ::IsDebuggerPresent() != 0; |
| 102 } | 102 } |
| 103 | 103 |
| 104 void BreakDebugger() { | 104 void BreakDebugger() { |
| 105 if (IsDebugUISuppressed()) | 105 if (IsDebugUISuppressed()) |
| 106 _exit(1); | 106 _exit(1); |
| 107 __debugbreak(); | 107 __debugbreak(); |
| 108 #if defined(NDEBUG) |
| 109 _exit(1); |
| 110 #endif |
| 108 } | 111 } |
| 109 | 112 |
| 110 } // namespace debug | 113 } // namespace debug |
| 111 } // namespace base | 114 } // namespace base |
| OLD | NEW |