summaryrefslogtreecommitdiff
path: root/doc/unw_backtrace.tex
diff options
context:
space:
mode:
authorGregory LEOCADIE <gregory.leocadie@datadoghq.com>2022-12-08 12:02:43 +0100
committerDave Watson <dade.watson@gmail.com>2023-01-11 08:56:12 -0800
commit3a79065d676b222338a4f679d51f9d8f991117d3 (patch)
tree10038fabfb69344b6fd62fa9df5f4ce141072fbb /doc/unw_backtrace.tex
parent8f54c55ea44f1906c23b5f01aea92b548b1e8839 (diff)
downloadlibunwind-3a79065d676b222338a4f679d51f9d8f991117d3.tar.gz
Add documentation
Diffstat (limited to 'doc/unw_backtrace.tex')
-rw-r--r--doc/unw_backtrace.tex5
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