summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authordaco65 <daco65@gmail.com>2008-09-06 23:05:06 +0000
committerdaco65 <daco65@gmail.com>2008-09-06 23:05:06 +0000
commit3078f66763cedea081b5d4855d657d421edf7200 (patch)
tree9595b36f35da2bf7a026792d51c0c7faa4922416 /Source/Core
parent953085d4d9c632b4bccc4b77c049527d6a6ce5cf (diff)
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
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/Src/ExtendedTrace.cpp11
-rw-r--r--Source/Core/DolphinWX/src/Main.cpp4
2 files changed, 15 insertions, 0 deletions
diff --git a/Source/Core/Common/Src/ExtendedTrace.cpp b/Source/Core/Common/Src/ExtendedTrace.cpp
index 2f6968856e..625d74892f 100644
--- a/Source/Core/Common/Src/ExtendedTrace.cpp
+++ b/Source/Core/Common/Src/ExtendedTrace.cpp
@@ -158,7 +158,12 @@ static BOOL GetFunctionInfoFromAddresses( ULONG fnAddress, ULONG stackAddress, L
_tcscpy( lpszSymbol, _T("?") );
// Get symbol info for IP
+#ifdef _M_IX86
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
UnDecorateSymbolName( pSym->Name, lpszNonUnicodeUnDSymbol, BUFFERSIZE,
@@ -304,9 +309,15 @@ void StackTrace( HANDLE hThread, LPCTSTR lpszMessage, FILE *file )
}
::ZeroMemory( &callStack, sizeof(callStack) );
+#ifdef _M_IX86
callStack.AddrPC.Offset = context.Eip;
callStack.AddrStack.Offset = context.Esp;
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.AddrStack.Mode = AddrModeFlat;
callStack.AddrFrame.Mode = AddrModeFlat;
diff --git a/Source/Core/DolphinWX/src/Main.cpp b/Source/Core/DolphinWX/src/Main.cpp
index 8cd51f4f30..562459ffa6 100644
--- a/Source/Core/DolphinWX/src/Main.cpp
+++ b/Source/Core/DolphinWX/src/Main.cpp
@@ -50,7 +50,11 @@ LONG WINAPI MyUnhandledExceptionFilter(LPEXCEPTION_POINTERS e) {
//dumpCurrentDate(file);
etfprintf(file, "Unhandled Exception\n Code: 0x%08X\n",
e->ExceptionRecord->ExceptionCode);
+#ifdef _M_IX86
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);
_flushall();