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