X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec38225e66be33459125f0df1c9e3695c27509c0..404b319a85dadd7decf7a5a5331020520031a41c:/src/msw/stackwalk.cpp diff --git a/src/msw/stackwalk.cpp b/src/msw/stackwalk.cpp index 9e87fc52a7..9ff630ac76 100644 --- a/src/msw/stackwalk.cpp +++ b/src/msw/stackwalk.cpp @@ -1,8 +1,8 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: msw/stackwalk.cpp +// Name: src/msw/stackwalk.cpp // Purpose: wxStackWalker implementation for Win32 // Author: Vadim Zeitlin -// Modified by: +// Modified by: Artur Bac 2010-10-01 AMD64 Port // Created: 2005-01-08 // RCS-ID: $Id$ // Copyright: (c) 2003-2005 Vadim Zeitlin @@ -253,7 +253,16 @@ void wxStackWalker::WalkFrom(const CONTEXT *pCtx, size_t skip, size_t maxDepth) STACKFRAME sf; wxZeroMemory(sf); -#ifdef _M_IX86 +#if defined(_M_AMD64) + sf.AddrPC.Offset = ctx.Rip; + sf.AddrPC.Mode = AddrModeFlat; + sf.AddrStack.Offset = ctx.Rsp; + sf.AddrStack.Mode = AddrModeFlat; + sf.AddrFrame.Offset = ctx.Rbp; + sf.AddrFrame.Mode = AddrModeFlat; + + dwMachineType = IMAGE_FILE_MACHINE_AMD64; +#elif defined(_M_IX86) sf.AddrPC.Offset = ctx.Eip; sf.AddrPC.Mode = AddrModeFlat; sf.AddrStack.Offset = ctx.Esp;