revised st*.h headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11,36 +11,33 @@
|
||||
|
||||
wxStackWalker allows an application to enumerate, or walk, the stack frames
|
||||
(the function callstack).
|
||||
It is mostly useful in only two situations:
|
||||
inside wxApp::OnFatalException function to
|
||||
programmatically get the location of the crash and, in debug builds, in
|
||||
wxApp::OnAssertFailure to report the caller of the failed
|
||||
assert.
|
||||
|
||||
wxStackWalker works by repeatedly calling
|
||||
the wxStackWalker::OnStackFrame method for each frame in the
|
||||
stack, so to use it you must derive your own class from it and override this
|
||||
method.
|
||||
It is mostly useful in only two situations: inside wxApp::OnFatalException
|
||||
function to programmatically get the location of the crash and, in debug builds,
|
||||
in wxApp::OnAssertFailure to report the caller of the failed assert.
|
||||
|
||||
wxStackWalker works by repeatedly calling the wxStackWalker::OnStackFrame
|
||||
method for each frame in the stack, so to use it you must derive your own
|
||||
class from it and override this method.
|
||||
|
||||
This class will not return anything except raw stack frame addresses if the
|
||||
debug information is not available. Under Win32 this means that the PDB file
|
||||
matching the program being executed should be present. Note that if you use
|
||||
Microsoft Visual C++ compiler, you can create PDB files even for the programs
|
||||
built in release mode and it doesn't affect the program size (at least if you
|
||||
don't forget to add @c /opt:ref option which is suppressed by using
|
||||
@c /debug linker option by default but should be always enabled for
|
||||
release builds). Under Unix, you need to compile your program with debugging
|
||||
information (usually using @c -g compiler and linker options) to get the
|
||||
file and line numbers information, however function names should be available
|
||||
even without it. Of course, all this is only @true if you build using a recent
|
||||
enough version of GNU libc which provides the @c backtrace() function
|
||||
needed to walk the stack.
|
||||
matching the program being executed should be present.
|
||||
Note that if you use Microsoft Visual C++ compiler, you can create PDB files
|
||||
even for the programs built in release mode and it doesn't affect the program
|
||||
size (at least if you don't forget to add @c /opt:ref option which is suppressed
|
||||
by using @c /debug linker option by default but should be always enabled for
|
||||
release builds).
|
||||
Under Unix, you need to compile your program with debugging information
|
||||
(usually using @c -g compiler and linker options) to get the file and line
|
||||
numbers information, however function names should be available even without it.
|
||||
Of course, all this is only @true if you build using a recent enough version
|
||||
of GNU libc which provides the @c backtrace() function needed to walk the stack.
|
||||
|
||||
@ref overview_debuggingoverview "debugging overview" for how to make it
|
||||
available.
|
||||
See @ref overview_debugging for how to make it available.
|
||||
|
||||
@library{wxbase}
|
||||
@category{FIXME}
|
||||
@category{debugging}
|
||||
|
||||
@see wxStackFrame
|
||||
*/
|
||||
@@ -48,8 +45,7 @@ class wxStackWalker
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Constructor does nothing, use Walk() to walk the
|
||||
stack.
|
||||
Constructor does nothing, use Walk() to walk the stack.
|
||||
*/
|
||||
wxStackWalker();
|
||||
|
||||
@@ -69,14 +65,15 @@ public:
|
||||
number of them (this can be useful when Walk() is called from some known
|
||||
location and you don't want to see the first few frames anyhow; also
|
||||
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.
|
||||
*/
|
||||
virtual void Walk(size_t skip = 1, size_t maxDepth = 200);
|
||||
|
||||
/**
|
||||
Enumerate stack frames from the location of uncaught exception.
|
||||
This method can only be called from
|
||||
wxApp::OnFatalException.
|
||||
This method can only be called from wxApp::OnFatalException().
|
||||
|
||||
Up to @a maxDepth frames are walked from the innermost to the outermost one.
|
||||
*/
|
||||
virtual void WalkFromException(size_t maxDepth = 200);
|
||||
@@ -88,12 +85,11 @@ public:
|
||||
@class wxStackFrame
|
||||
|
||||
wxStackFrame represents a single stack frame, or a single function in the call
|
||||
stack, and is used exclusively together with
|
||||
wxStackWalker, see there for a more detailed
|
||||
discussion.
|
||||
stack, and is used exclusively together with wxStackWalker, see there for a more
|
||||
detailed discussion.
|
||||
|
||||
@library{wxbase}
|
||||
@category{FIXME}
|
||||
@category{debugging}
|
||||
|
||||
@see wxStackWalker
|
||||
*/
|
||||
@@ -106,10 +102,10 @@ public:
|
||||
void* GetAddress() const;
|
||||
|
||||
/**
|
||||
Return the name of the file containing this frame, empty if
|
||||
unavailable (typically because debug info is missing).
|
||||
Use HasSourceLocation() to check whether
|
||||
the file name is available.
|
||||
Return the name of the file containing this frame, empty if unavailable
|
||||
(typically because debug info is missing).
|
||||
|
||||
Use HasSourceLocation() to check whether the file name is available.
|
||||
*/
|
||||
wxString GetFileName() const;
|
||||
|
||||
@@ -131,8 +127,7 @@ public:
|
||||
wxString GetModule() const;
|
||||
|
||||
/**
|
||||
Return the unmangled (if possible) name of the function containing this
|
||||
frame.
|
||||
Return the unmangled (if possible) name of the function containing this frame.
|
||||
*/
|
||||
wxString GetName() const;
|
||||
|
||||
@@ -143,11 +138,10 @@ public:
|
||||
|
||||
/**
|
||||
Get the name, type and value (in text form) of the given parameter.
|
||||
Any pointer may be @NULL if you're not interested in the corresponding
|
||||
value.
|
||||
Any pointer may be @NULL if you're not interested in the corresponding value.
|
||||
|
||||
Return @true if at least some values could be retrieved.
|
||||
This function currently is only implemented under Win32 and requires a PDB
|
||||
file.
|
||||
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;
|
||||
|
Reference in New Issue
Block a user