fix win64 crashes and enable LARGE_WORLDS
This commit is contained in:
@@ -20,9 +20,16 @@ void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName )
|
||||
info.dwFlags = 0;
|
||||
|
||||
#if ( defined _WINDOWS64 | defined _DURANGO )
|
||||
// 0x406D1388 is a debugger protocol, not a real exception - only a debugger
|
||||
// can consume it. With nothing attached it terminates the process.
|
||||
if( !IsDebuggerPresent() )
|
||||
return;
|
||||
|
||||
__try
|
||||
{
|
||||
RaiseException( 0x406D1388, 0, sizeof(info)/sizeof(DWORD), (ULONG_PTR *)&info );
|
||||
// count is in ULONG_PTRs, not DWORDs - on x64 the DWORD count made
|
||||
// RaiseException read past the end of info
|
||||
RaiseException( 0x406D1388, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR *)&info );
|
||||
}
|
||||
__except( GetExceptionCode()==0x406D1388 ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_EXECUTE_HANDLER )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user