wxZeroMemory(symbolBuffer);
PSYMBOL_INFO pSymbol = (PSYMBOL_INFO)symbolBuffer;
- pSymbol->SizeOfStruct = sizeof(symbolBuffer);
+ pSymbol->SizeOfStruct = sizeof(SYMBOL_INFO);
pSymbol->MaxNameLen = MAX_NAME_LEN;
DWORD64 symDisplacement = 0;
// wxStackWalker
// ----------------------------------------------------------------------------
-void wxStackWalker::WalkFrom(const CONTEXT *pCtx, size_t skip)
+void wxStackWalker::WalkFrom(const CONTEXT *pCtx, size_t skip, size_t maxDepth)
{
if ( !wxDbgHelpDLL::Init() )
{
#endif // _M_IX86
// iterate over all stack frames
- for ( size_t nLevel = 0; ; nLevel++ )
+ for ( size_t nLevel = 0; nLevel < maxDepth; nLevel++ )
{
// get the next stack frame
if ( !wxDbgHelpDLL::StackWalk
#endif
}
-void wxStackWalker::WalkFrom(const _EXCEPTION_POINTERS *ep, size_t skip)
+void wxStackWalker::WalkFrom(const _EXCEPTION_POINTERS *ep, size_t skip, size_t maxDepth)
{
- WalkFrom(ep->ContextRecord, skip);
+ WalkFrom(ep->ContextRecord, skip, maxDepth);
}
-void wxStackWalker::WalkFromException()
+void wxStackWalker::WalkFromException(size_t maxDepth)
{
extern EXCEPTION_POINTERS *wxGlobalSEInformation;
_T("wxStackWalker::WalkFromException() can only be called from wxApp::OnFatalException()") );
// don't skip any frames, the first one is where we crashed
- WalkFrom(wxGlobalSEInformation, 0);
+ WalkFrom(wxGlobalSEInformation, 0, maxDepth);
}
void wxStackWalker::Walk(size_t skip, size_t WXUNUSED(maxDepth))
// ----------------------------------------------------------------------------
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))
{
}
-void wxStackWalker::WalkFromException()
+void wxStackWalker::WalkFromException(size_t WXUNUSED(maxDepth))
{
}