X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef81fe8b3f49914196ea77d9b7625ceee2776b47..fb4079af5ba82f05e1115f0f0c734b77cf8164e7:/src/msw/stackwalk.cpp diff --git a/src/msw/stackwalk.cpp b/src/msw/stackwalk.cpp index 669e788817..1b96e364d2 100644 --- a/src/msw/stackwalk.cpp +++ b/src/msw/stackwalk.cpp @@ -161,7 +161,7 @@ void wxStackFrame::OnParam(PSYMBOL_INFO pSymInfo) BOOL CALLBACK EnumSymbolsProc(PSYMBOL_INFO pSymInfo, ULONG WXUNUSED(SymSize), PVOID data) { - wxStackFrame *frame = wx_static_cast(wxStackFrame *, data); + wxStackFrame *frame = static_cast(data); // we're only interested in parameters if ( pSymInfo->Flags & IMAGEHLP_SYMBOL_INFO_PARAMETER ) @@ -293,7 +293,7 @@ void wxStackWalker::WalkFrom(const CONTEXT *pCtx, size_t skip, size_t maxDepth) if ( nLevel >= skip ) { wxStackFrame frame(nLevel - skip, - (void *)sf.AddrPC.Offset, + wxUIntToPtr(sf.AddrPC.Offset), sf.AddrFrame.Offset); OnStackFrame(frame); @@ -315,6 +315,8 @@ void wxStackWalker::WalkFrom(const _EXCEPTION_POINTERS *ep, size_t skip, size_t WalkFrom(ep->ContextRecord, skip, maxDepth); } +#if wxUSE_ON_FATAL_EXCEPTION + void wxStackWalker::WalkFromException(size_t maxDepth) { extern EXCEPTION_POINTERS *wxGlobalSEInformation; @@ -326,13 +328,15 @@ void wxStackWalker::WalkFromException(size_t maxDepth) WalkFrom(wxGlobalSEInformation, 0, maxDepth); } +#endif // wxUSE_ON_FATAL_EXCEPTION + void wxStackWalker::Walk(size_t skip, size_t WXUNUSED(maxDepth)) { // to get a CONTEXT for the current location, simply force an exception and // get EXCEPTION_POINTERS from it // // note: - // 1. we additionally skip RaiseException() and WalkFromException() frames + // 1. we additionally skip RaiseException() and WalkFrom() frames // 2. explicit cast to EXCEPTION_POINTERS is needed with VC7.1 even if it // shouldn't have been according to the docs __try @@ -342,7 +346,8 @@ void wxStackWalker::Walk(size_t skip, size_t WXUNUSED(maxDepth)) __except( WalkFrom((EXCEPTION_POINTERS *)GetExceptionInformation(), skip + 2), EXCEPTION_CONTINUE_EXECUTION ) { - // never executed because of WalkFromException() return value + // never executed because the above expression always evaluates to + // EXCEPTION_CONTINUE_EXECUTION } } @@ -386,19 +391,24 @@ void wxStackFrame::OnGetParam() // ---------------------------------------------------------------------------- void -wxStackWalker::WalkFrom(const CONTEXT * WXUNUSED(pCtx), size_t WXUNUSED(skip)) +wxStackWalker::WalkFrom(const CONTEXT * WXUNUSED(pCtx), + size_t WXUNUSED(skip), + size_t WXUNUSED(maxDepth)) { } void wxStackWalker::WalkFrom(const _EXCEPTION_POINTERS * WXUNUSED(ep), - size_t WXUNUSED(skip)) + size_t WXUNUSED(skip), + size_t WXUNUSED(maxDepth)) { } +#if wxUSE_ON_FATAL_EXCEPTION void wxStackWalker::WalkFromException(size_t WXUNUSED(maxDepth)) { } +#endif // wxUSE_ON_FATAL_EXCEPTION void wxStackWalker::Walk(size_t WXUNUSED(skip), size_t WXUNUSED(maxDepth)) {