]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/stackwalker.tex
documented wxStackWalker/Frame
[wxWidgets.git] / docs / latex / wx / stackwalker.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: stackwalker.tex
3 %% Purpose: wxStackWalker documentation
4 %% Author: Vadim Zeitlin
5 %% Created: 2005-01-19
6 %% RCS-ID: $Id$
7 %% Copyright: (c) 2005 Vadim Zeitlin
8 %% License: wxWidgets license
9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10
11 \section{\class{wxStackWalker}}\label{wxstackwalker}
12
13 wxStackWalker allows to enumerate, or walk, the stack frames or, in other
14 words, the functions callstack. It is mostly useful in only two situations:
15 inside \helpref{wxApp::OnFatalException}{wxapponfatalexception} function to
16 programmatically get the location of the crash and, in debug builds, in
17 \helpref{wxApp::OnAssert}{wxapponassert} to report the caller of the failed
18 assert.
19
20 wxStackWalker works by repeatedly calling
21 \helpref{OnStackFrame}{wxstackwalkeronstackframe} method for each frame in the
22 stack, so to use it you must derive your own class from it and override this
23 method.
24
25 This class will not return anything except raw stack frame addresses if the
26 debug information is not available. See
27 \helpref{debugging overview}{debuggingoverview} for how to make it available.
28
29 \wxheading{Derived from}
30
31 No base class
32
33 \wxheading{Include files}
34
35 <wx/stackwalk.h>
36
37 Only available if \texttt{wxUSE\_STACKWALKER} is $1$, currently only
38 implemented for Win32 and Unix versions using recent version of GNU libc.
39
40 \wxheading{See also}
41
42 \helpref{wxStackFrame}{wxstackframe}
43
44
45 \latexignore{\rtfignore{\wxheading{Members}}}
46
47
48 \membersection{wxStackWalker::wxStackWalker}\label{wxstackwalkerwxstackwalker}
49
50 \func{}{wxStackWalker}{\void}
51
52 Constructor does nothing, use \helpref{Walk()}{wxstackwalkerwalk} to walk the
53 stack.
54
55
56 \membersection{wxStackWalker::\destruct{wxStackWalker}}\label{wxstackwalkerdtor}
57
58 \func{}{\destruct{wxStackWalker}}{\void}
59
60 Destructor does nothing neither but should be virtual as this class is used as
61 a base one.
62
63
64 \membersection{wxStackWalker::OnStackFrame}\label{wxstackwalkeronstackframe}
65
66 \func{void}{OnStackFrame}{\param{const wxStackFrame\& }{frame}}
67
68 This function must be overrided to process the given frame.
69
70
71 \membersection{wxStackWalker::Walk}\label{wxstackwalkerwalk}
72
73 \func{void}{Walk}{\param{size\_t }{skip = 1}}
74
75 Enumerate stack frames from the current location, skipping the initial
76 number of them (this can be useful when Walk() is called from some known
77 location and you don't want to see the first few frames anyhow; also
78 notice that Walk() frame itself is not included if skip $\ge 1$).
79
80
81 \membersection{wxStackWalker::WalkFromException}\label{wxstackwalkerwalkfromexception}
82
83 \func{void}{WalkFromException}{\void}
84
85 Enumerate stack frames from the location of uncaught exception.
86 This method can only be called from
87 \helpref{wxApp::OnFatalException()}{wxapponfatalexception}.
88