From 7aa1dd0905be96efb22be6461c473f63caa29c33 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 17 Nov 2015 16:26:24 +0100 Subject: [PATCH 1/2] Add x86_64 support to backtrace generator on windows. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721 --- dbus/dbus-sysdeps-win.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 107918e..8146272 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -2483,17 +2483,18 @@ static void dump_backtrace_for_thread (HANDLE hThread) { char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(char)]; PSYMBOL_INFO pSymbol = (PSYMBOL_INFO)buffer; - DWORD dwDisplacement; + DWORD64 displacement; IMAGEHLP_LINE line; + DWORD dwDisplacement; IMAGEHLP_MODULE moduleInfo; pSymbol->SizeOfStruct = sizeof(SYMBOL_INFO); pSymbol->MaxNameLen = MAX_SYM_NAME; - if (SymFromAddr (GetCurrentProcess (), sf.AddrPC.Offset, &dwDisplacement, pSymbol)) + if (SymFromAddr (GetCurrentProcess (), sf.AddrPC.Offset, &displacement, pSymbol)) { - if (dwDisplacement) - DPRINTF ("%3d %s+0x%lx", i++, pSymbol->Name, dwDisplacement); + if (displacement) + DPRINTF ("%3d %s+0x%llx", i++, pSymbol->Name, displacement); else DPRINTF ("%3d %s", i++, pSymbol->Name); } -- 1.8.4.5