Replace MSVC __debugbreak with cross-compiler DEBUG_BREAK macro. (#1540)

This commit is contained in:
ModMaker101
2026-04-26 15:38:13 -05:00
committed by itsRevela
parent 0625db38f5
commit cbdb92d045
73 changed files with 117 additions and 129 deletions
+12
View File
@@ -0,0 +1,12 @@
#pragma once
#include <csignal>
#if defined(_MSC_VER)
#define DEBUG_BREAK() __debugbreak()
#elif defined(__GNUC__) || defined(__clang__)
#define DEBUG_BREAK() __builtin_trap()
#elif defined(SIGTRAP)
#define DEBUG_BREAK() std::raise(SIGTRAP)
#else
#define DEBUG_BREAK() ((void)0)
#endif