Overte C++ Documentation
Breakpoint.h
1 //
2 // Breakpoint.h
3 //
4 //
5 // Created by Dale Glass on 5/6/2022
6 // Copyright 2022 Dale Glass
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 
13 // Software defined breakpoints, for aiding in debugging
14 
15 #pragma once
16 
17 #if defined(__GNUC__)
18  #include <csignal>
19  #define BREAKPOINT raise(SIGINT);
20 #elif defined(__clang__)
21  #define BREAKPOINT __builtin_trap();
22 #elif _MSC_VER && !__INTEL_COMPILER
23  #include <intrin.h>
24  #define BREAKPOINT __debugbreak();
25 #else
26  #include "CrashHelpers.h"
27  #define BREAKPOINT crash::nullDeref();
28 #endif