diff options
Diffstat (limited to 'doc/unw_backtrace.tex')
-rw-r--r-- | doc/unw_backtrace.tex | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/unw_backtrace.tex b/doc/unw_backtrace.tex index 362a56f2..205aaea4 100644 --- a/doc/unw_backtrace.tex +++ b/doc/unw_backtrace.tex @@ -13,6 +13,7 @@ \File{\#include $<$libunwind.h$>$}\\ \Type{int} \Func{unw\_backtrace}(\Type{void~**}\Var{buffer}, \Type{int}~\Var{size});\\ +\Type{int} \Func{unw\_backtrace2}(\Type{void~**}\Var{buffer}, \Type{int}~\Var{size}, \Type{unw_context_t~*}\Var{ctxt});\\ \File{\#include $<$execinfo.h$>$}\\ @@ -32,6 +33,10 @@ aliases \Func{backtrace}() to \Func{unw\_backtrace}(), so when a program calling \Func{backtrace}() is linked against \Prog{libunwind}, it may end up calling \Func{unw\_backtrace}(). +If the \Type{unw\_context_t} is known to be a signal frame (i.e., from the third argument +in a sigaction handler on linux), \Func{unw\_backtrace2} can be used to collect +only the frames before the signal frame. + \section{Return Value} The routine returns the number of addresses stored in the array pointed by |