From f408f179d257feb6795401db4fa0c1fcc357db81 Mon Sep 17 00:00:00 2001 From: Gemma Peter Date: Fri, 2 Jun 2017 01:21:10 +0100 Subject: [PATCH] debugBreak function for Linux --- src/utils.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils.h b/src/utils.h index b8241df..3d9312e 100644 --- a/src/utils.h +++ b/src/utils.h @@ -7,7 +7,12 @@ #include #ifdef _DEBUG - #define debugBreak() _asm { int 3 } + #ifdef LINUX + #define debugBreak() raise(SIGTRAP); + #else + #define debugBreak() _asm { int 3 } + #endif + #define ASSERT(expr) if (expr) {} else { LOG("ASSERT %s in %s:%d\n", #expr, __FILE__, __LINE__); debugBreak(); } #ifndef ANDROID