1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-22 09:38:56 +08:00

fix DebuggerBreak warning on Mac debug builds

This commit is contained in:
Maksim Smolin 2019-01-22 16:10:18 -08:00
parent 0ef5d3d482
commit a0c8c381af

View File

@ -427,7 +427,7 @@ typedef void * HINSTANCE;
// On OSX, SIGTRAP doesn't really stop the thread cold when debugging.
// So if being debugged, use INT3 which is precise.
#ifdef OSX
#define DebuggerBreak() if ( Plat_IsInDebugSession() ) { __asm ( "int $3" ); } else { raise(SIGTRAP); }
#define DebuggerBreak() do { if ( Plat_IsInDebugSession() ) { __asm ( "int $3" ); } else { raise(SIGTRAP); } } while (0)
#else
#define DebuggerBreak() raise(SIGTRAP)
#endif