X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4701dc09838c3da46a8bc2836265a7dffee541ee..1b7751aaa9a86d76a850b9267bc0c201e3cea30f:/interface/wx/stackwalk.h diff --git a/interface/wx/stackwalk.h b/interface/wx/stackwalk.h index 4464d30708..486cdb04c4 100644 --- a/interface/wx/stackwalk.h +++ b/interface/wx/stackwalk.h @@ -3,9 +3,14 @@ // Purpose: interface of wxStackWalker // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +/** + This is the default value of the wxStackWalker::Walk function. +*/ +#define wxSTACKWALKER_MAX_DEPTH (200) + /** @class wxStackWalker @@ -47,7 +52,7 @@ public: /** Constructor does nothing, use Walk() to walk the stack. */ - wxStackWalker(); + wxStackWalker(const char* argv0 = NULL); /** Destructor does nothing neither but should be virtual as this class is used as @@ -55,11 +60,6 @@ public: */ virtual ~wxStackWalker(); - /** - This function must be overrided to process the given frame. - */ - void OnStackFrame(const wxStackFrame& frame); - /** Enumerate stack frames from the current location, skipping the initial number of them (this can be useful when Walk() is called from some known @@ -67,16 +67,24 @@ public: notice that Walk() frame itself is not included if skip = 1). Up to @a maxDepth frames are walked from the innermost to the outermost one. + It defaults to ::wxSTACKWALKER_MAX_DEPTH. */ - virtual void Walk(size_t skip = 1, size_t maxDepth = 200); + virtual void Walk(size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH); /** Enumerate stack frames from the location of uncaught exception. This method can only be called from wxApp::OnFatalException(). Up to @a maxDepth frames are walked from the innermost to the outermost one. + It defaults to ::wxSTACKWALKER_MAX_DEPTH. + */ + virtual void WalkFromException(size_t maxDepth = wxSTACKWALKER_MAX_DEPTH); + +protected: + /** + This function must be overrided to process the given frame. */ - virtual void WalkFromException(size_t maxDepth = 200); + virtual void OnStackFrame(const wxStackFrame& frame) = 0; }; @@ -143,8 +151,8 @@ public: Return @true if at least some values could be retrieved. This function currently is only implemented under Win32 and requires a PDB file. */ - bool GetParam(size_t n, wxString* type, wxString* name, - wxString* value) const; + virtual bool GetParam(size_t n, wxString* type, wxString* name, + wxString* value) const; /** Return the number of parameters of this function (may return 0 if we