pscx2: s/wxTrap/pxTrap/

wxTrap is only enabled on wxDebug build. pxTrap is always available. It is much nicer for debug on linux
This commit is contained in:
Gregory Hainaut 2014-12-12 21:46:52 +01:00
parent c5efdb9df9
commit 768362852e
5 changed files with 8 additions and 5 deletions

View File

@ -18,6 +18,9 @@
#include "Assertions.h"
#include "ScopedPtr.h"
// Because wxTrap isn't available on Linux builds of wxWidgets (non-Debug, typically)
void pxTrap();
// --------------------------------------------------------------------------------------
// DESTRUCTOR_CATCHALL - safe destructor helper
// --------------------------------------------------------------------------------------

View File

@ -102,7 +102,7 @@ DEVASSERT_INLINE void pxOnAssert( const DiagnosticOrigin& origin, const wxChar*
// we get meaningless assertions while unwinding stack traces after exceptions have occurred.
RecursionGuard guard( s_assert_guard );
if (guard.Counter > 2) { return wxTrap(); }
if (guard.Counter > 2) { return pxTrap(); }
// wxWidgets doesn't come with debug builds on some Linux distros, and other distros make
// it difficult to use the debug build (compilation failures). To handle these I've had to

View File

@ -67,7 +67,7 @@ static void SysPageFaultSignalFilter( int signal, siginfo_t *siginfo, void * )
// Bad mojo! Completely invalid address.
// Instigate a trap if we're in a debugger, and if not then do a SIGKILL.
wxTrap();
pxTrap();
if (!IsDebugBuild) raise( SIGKILL );
}

View File

@ -330,7 +330,7 @@ void BaseVmReserveListener::OnPageFaultEvent(const PageFaultInfo& info, bool& ha
}
else
{
wxTrap();
pxTrap();
}
}
#endif

View File

@ -105,12 +105,12 @@ void Pcsx2App::OnAssertFailure( const wxChar *file, int line, const wxChar *func
// Re-entrant assertions are bad mojo -- trap immediately.
static DeclareTls(int) _reentrant_lock( 0 );
RecursionGuard guard( _reentrant_lock );
if( guard.IsReentrant() ) wxTrap();
if( guard.IsReentrant() ) pxTrap();
wxCharBuffer bleh( wxString(func).ToUTF8() );
if( AppDoAssert( DiagnosticOrigin( file, line, bleh, cond ), msg ) )
{
wxTrap();
pxTrap();
}
}