Implement IsDebuggerPresent() and DebugBreak() in OS X. This uses an unstable api so it will only be in debug builds.

This commit is contained in:
Steve Checkoway
2006-06-16 07:18:39 +00:00
parent 87e571a528
commit aef9e00016
3 changed files with 44 additions and 1 deletions
+5 -1
View File
@@ -6,6 +6,10 @@
# include "windows.h"
# include "archutils/Win32/Crash.h"
# endif
#elif defined(MACOSX)
# include "archutils/Darwin/Crash.h"
using CrashHandler::IsDebuggerPresent;
using CrashHandler::DebugBreak;
#elif defined(_XBOX)
#else
# include <unistd.h>
@@ -17,7 +21,7 @@
void NORETURN sm_crash( const char *reason )
{
#if defined(_WINDOWS) && defined(CRASH_HANDLER)
#if ( defined(_WINDOWS) && defined(CRASH_HANDLER) ) || defined(MACOSX)
/* If we're being debugged, throw a debug break so it'll suspend the process. */
if( IsDebuggerPresent() )
{