mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 12:35:27 +00:00
fixed some issues with ExtendedTrace.cpp for 64bit builds. not sure about the (PDWORD64) tho (i had bad exp. with that in past projects).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@449 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
953085d4d9
commit
3078f66763
@ -158,7 +158,12 @@ static BOOL GetFunctionInfoFromAddresses( ULONG fnAddress, ULONG stackAddress, L
|
|||||||
_tcscpy( lpszSymbol, _T("?") );
|
_tcscpy( lpszSymbol, _T("?") );
|
||||||
|
|
||||||
// Get symbol info for IP
|
// Get symbol info for IP
|
||||||
|
#ifdef _M_IX86
|
||||||
if ( SymGetSymFromAddr( GetCurrentProcess(), (ULONG)fnAddress, &dwDisp, pSym ) )
|
if ( SymGetSymFromAddr( GetCurrentProcess(), (ULONG)fnAddress, &dwDisp, pSym ) )
|
||||||
|
#else
|
||||||
|
//makes it compile but hell im not sure if this works...
|
||||||
|
if ( SymGetSymFromAddr( GetCurrentProcess(), (ULONG)fnAddress, (PDWORD64)&dwDisp, pSym ) )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
// Make the symbol readable for humans
|
// Make the symbol readable for humans
|
||||||
UnDecorateSymbolName( pSym->Name, lpszNonUnicodeUnDSymbol, BUFFERSIZE,
|
UnDecorateSymbolName( pSym->Name, lpszNonUnicodeUnDSymbol, BUFFERSIZE,
|
||||||
@ -304,9 +309,15 @@ void StackTrace( HANDLE hThread, LPCTSTR lpszMessage, FILE *file )
|
|||||||
}
|
}
|
||||||
|
|
||||||
::ZeroMemory( &callStack, sizeof(callStack) );
|
::ZeroMemory( &callStack, sizeof(callStack) );
|
||||||
|
#ifdef _M_IX86
|
||||||
callStack.AddrPC.Offset = context.Eip;
|
callStack.AddrPC.Offset = context.Eip;
|
||||||
callStack.AddrStack.Offset = context.Esp;
|
callStack.AddrStack.Offset = context.Esp;
|
||||||
callStack.AddrFrame.Offset = context.Ebp;
|
callStack.AddrFrame.Offset = context.Ebp;
|
||||||
|
#else
|
||||||
|
callStack.AddrPC.Offset = context.Rip;
|
||||||
|
callStack.AddrStack.Offset = context.Rsp;
|
||||||
|
callStack.AddrFrame.Offset = context.Rbp;
|
||||||
|
#endif
|
||||||
callStack.AddrPC.Mode = AddrModeFlat;
|
callStack.AddrPC.Mode = AddrModeFlat;
|
||||||
callStack.AddrStack.Mode = AddrModeFlat;
|
callStack.AddrStack.Mode = AddrModeFlat;
|
||||||
callStack.AddrFrame.Mode = AddrModeFlat;
|
callStack.AddrFrame.Mode = AddrModeFlat;
|
||||||
|
@ -50,7 +50,11 @@ LONG WINAPI MyUnhandledExceptionFilter(LPEXCEPTION_POINTERS e) {
|
|||||||
//dumpCurrentDate(file);
|
//dumpCurrentDate(file);
|
||||||
etfprintf(file, "Unhandled Exception\n Code: 0x%08X\n",
|
etfprintf(file, "Unhandled Exception\n Code: 0x%08X\n",
|
||||||
e->ExceptionRecord->ExceptionCode);
|
e->ExceptionRecord->ExceptionCode);
|
||||||
|
#ifdef _M_IX86
|
||||||
STACKTRACE2(file, e->ContextRecord->Eip, e->ContextRecord->Esp, e->ContextRecord->Ebp);
|
STACKTRACE2(file, e->ContextRecord->Eip, e->ContextRecord->Esp, e->ContextRecord->Ebp);
|
||||||
|
#else
|
||||||
|
STACKTRACE2(file, e->ContextRecord->Rip, e->ContextRecord->Rsp, e->ContextRecord->Rbp);
|
||||||
|
#endif
|
||||||
fclose(file);
|
fclose(file);
|
||||||
_flushall();
|
_flushall();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user