| 18 | namespace debug |
| 19 | { |
| 20 | void breakpoint() |
| 21 | { |
| 22 | #if CROWN_COMPILER_MSVC |
| 23 | __debugbreak(); |
| 24 | #elif CROWN_PLATFORM_EMSCRIPTEN |
| 25 | emscripten_debugger(); |
| 26 | #elif CROWN_PLATFORM_LINUX |
| 27 | raise(SIGTRAP); |
| 28 | #elif CROWN_COMPILER_GCC || CROWN_COMPILER_CLANG |
| 29 | __builtin_trap(); |
| 30 | #else |
| 31 | # error "Unavailable" |
| 32 | #endif |
| 33 | } |
| 34 | |
| 35 | void crash(CrashType::Enum type) |
| 36 | { |