Feature patch: Xbox Crash Handling.
Seems that the Xbox had debugger detection routines and a way to have a Debug Break. this patch activates it.
This commit is contained in:
@@ -48,7 +48,7 @@ void RageException::Throw( const char *sFmt, ... )
|
||||
fflush( stdout );
|
||||
}
|
||||
|
||||
#if defined(WINDOWS) && defined(DEBUG)
|
||||
#if (defined(WINDOWS) && defined(DEBUG)) || defined(_XDBG)
|
||||
if( IsDebuggerPresent() )
|
||||
DebugBreak();
|
||||
#endif
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
#include <xgraphics.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(_XDBG)
|
||||
#include <xbdm.h>
|
||||
#define IsDebuggerPresent() DmIsDebuggerPresent()
|
||||
#endif
|
||||
|
||||
// Xbox base path
|
||||
#define SYS_BASE_PATH "D:\\"
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# include "archutils/Darwin/Crash.h"
|
||||
using CrashHandler::IsDebuggerPresent;
|
||||
using CrashHandler::DebugBreak;
|
||||
#elif defined(_XBOX)
|
||||
#elif defined(_XDBG)
|
||||
#else
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
@@ -21,7 +21,7 @@ using CrashHandler::DebugBreak;
|
||||
|
||||
void NORETURN sm_crash( const char *reason )
|
||||
{
|
||||
#if ( defined(_WINDOWS) && defined(CRASH_HANDLER) ) || defined(MACOSX)
|
||||
#if ( defined(_WINDOWS) && defined(CRASH_HANDLER) ) || defined(MACOSX) || defined(_XDBG)
|
||||
/* If we're being debugged, throw a debug break so it'll suspend the process. */
|
||||
if( IsDebuggerPresent() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user