| 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 <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 namespace debug { | 11 namespace debug { |
| 12 | 12 |
| 13 bool BeingDebugged() { | 13 bool BeingDebugged() { |
| 14 return ::IsDebuggerPresent() != 0; | 14 return ::IsDebuggerPresent() != 0; |
| 15 } | 15 } |
| 16 | 16 |
| 17 void BreakDebugger() { | 17 void BreakDebugger() { |
| 18 if (IsDebugUISuppressed()) | 18 if (IsDebugUISuppressed()) |
| 19 _exit(1); | 19 _exit(1); |
| 20 | 20 |
| 21 |
| 21 __debugbreak(); | 22 __debugbreak(); |
| 22 } | 23 } |
| 23 | 24 |
| 24 } // namespace debug | 25 } // namespace debug |
| 25 } // namespace base | 26 } // namespace base |
| OLD | NEW |