1 // Copyright 2010 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "base/debug/debugger.h" 6 7 #include <stdlib.h> 8 #include <windows.h> 9 10 namespace base { 11 namespace debug { 12 BeingDebugged()13bool BeingDebugged() { 14 return ::IsDebuggerPresent() != 0; 15 } 16 BreakDebuggerAsyncSafe()17void BreakDebuggerAsyncSafe() { 18 if (IsDebugUISuppressed()) 19 _exit(1); 20 21 __debugbreak(); 22 } 23 VerifyDebugger()24void VerifyDebugger() {} 25 26 } // namespace debug 27 } // namespace base 28