| 6 |
| 7 | #include <stdlib.h> |
| 8 | #include <windows.h> |
| 9 |
| 10 | #include "base/clang_profiling_buildflags.h" |
| 11 |
| 12 | #if BUILDFLAG(CLANG_PROFILING) |
| 13 | #include "base/test/clang_profiling.h" |
| 14 | #endif |
| 15 |
| 16 | namespace base { |
| 17 | namespace debug { |
| 18 |
| 19 | bool BeingDebugged() { |
| 20 | return ::IsDebuggerPresent() != 0; |
| 21 | } |
| 22 |
| 23 | void BreakDebugger() { |
| 24 | #if BUILDFLAG(CLANG_PROFILING) |
| 25 | WriteClangProfilingProfile(); |
| 26 | #endif |
| 27 |
| 28 | if (IsDebugUISuppressed()) |
| 29 | _exit(1); |
| 30 |
| 31 | __debugbreak(); |
| 32 | } |
| 33 |
| 34 | void VerifyDebugger() {} |
| 35 |
| 36 | } // namespace debug |
| 37 | } // namespace base |
| 38 |