| 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" |
| 11 #include "base/debug_util.h" | |
| 12 #include "base/logging.h" | 11 #include "base/logging.h" |
| 13 | 12 |
| 14 namespace base { | 13 namespace base { |
| 15 namespace debug { | 14 namespace debug { |
| 16 | 15 |
| 17 namespace { | 16 namespace { |
| 18 | 17 |
| 19 // Minimalist key reader. | 18 // Minimalist key reader. |
| 20 // Note: Does not use the CRT. | 19 // Note: Does not use the CRT. |
| 21 bool RegReadString(HKEY root, const wchar_t* subkey, | 20 bool RegReadString(HKEY root, const wchar_t* subkey, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 } | 95 } |
| 97 } | 96 } |
| 98 return false; | 97 return false; |
| 99 } | 98 } |
| 100 | 99 |
| 101 bool BeingDebugged() { | 100 bool BeingDebugged() { |
| 102 return ::IsDebuggerPresent() != 0; | 101 return ::IsDebuggerPresent() != 0; |
| 103 } | 102 } |
| 104 | 103 |
| 105 void BreakDebugger() { | 104 void BreakDebugger() { |
| 106 if (DebugUtil::AreDialogsSuppressed()) | 105 if (IsDebugUISuppressed()) |
| 107 _exit(1); | 106 _exit(1); |
| 108 __debugbreak(); | 107 __debugbreak(); |
| 109 } | 108 } |
| 110 | 109 |
| 111 } // namespace debug | 110 } // namespace debug |
| 112 } // namespace base | 111 } // namespace base |
| OLD | NEW |