X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec38225e66be33459125f0df1c9e3695c27509c0..4a2d030adfa836f6ada1830c9057170d053bcc64:/src/msw/stackwalk.cpp?ds=sidebyside diff --git a/src/msw/stackwalk.cpp b/src/msw/stackwalk.cpp index 9e87fc52a7..f9c8ca986e 100644 --- a/src/msw/stackwalk.cpp +++ b/src/msw/stackwalk.cpp @@ -1,10 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// -// 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 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -253,7 +252,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;