xref: /aosp_15_r20/external/cronet/base/debug/debugger_win.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
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()14 bool BeingDebugged() {
15   return ::IsDebuggerPresent() != 0;
16 }
17 
BreakDebuggerAsyncSafe()18 void BreakDebuggerAsyncSafe() {
19   if (IsDebugUISuppressed())
20     _exit(1);
21 
22   __debugbreak();
23 }
24 
VerifyDebugger()25 void VerifyDebugger() {}
26 
27 }  // namespace debug
28 }  // namespace base
29