diff options
Diffstat (limited to 'doc/unw_backtrace.tex')
-rw-r--r-- | doc/unw_backtrace.tex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/unw_backtrace.tex b/doc/unw_backtrace.tex index 205aaea4..3e5152b6 100644 --- a/doc/unw_backtrace.tex +++ b/doc/unw_backtrace.tex @@ -13,7 +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});\\ +\Type{int} \Func{unw\_backtrace2}(\Type{void~**}\Var{buffer}, \Type{int}~\Var{size}, \Type{unw_context_t~*}\Var{ctxt}, \Type{int}~\Var{flag});\\ \File{\#include $<$execinfo.h$>$}\\ @@ -33,9 +33,11 @@ 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}(). +In case you want to obtain the backtrace from a specific \Type{unw\_context\_t}, +you can call \Func{unw\_backtrace2} with that context passing \Const{0} for flag. 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. +only the frames before the signal frame passing the \Const{UNW\_INIT\_SIGNAL\_FRAME} flag. \section{Return Value} |