summaryrefslogtreecommitdiff
path: root/doc/unw_init_local.tex
diff options
context:
space:
mode:
authoresiee.fr!m.delahaye <esiee.fr!m.delahaye>2003-03-31 19:57:09 +0000
committeresiee.fr!m.delahaye <esiee.fr!m.delahaye>2003-03-31 19:57:09 +0000
commit972aec70ba48f64db9b635a47a497cd65489d343 (patch)
treeb3e5ba690cbf6f31d876c73b798bbfd7f11a7587 /doc/unw_init_local.tex
parentf20b6f8a4a7cd06e070c87347b9db75fe2e6fe86 (diff)
downloadlibunwind-972aec70ba48f64db9b635a47a497cd65489d343.tar.gz
Patch to work around lexgrog bug
(Logical change 1.73)
Diffstat (limited to 'doc/unw_init_local.tex')
-rw-r--r--doc/unw_init_local.tex83
1 files changed, 83 insertions, 0 deletions
diff --git a/doc/unw_init_local.tex b/doc/unw_init_local.tex
index e69de29b..d32821ef 100644
--- a/doc/unw_init_local.tex
+++ b/doc/unw_init_local.tex
@@ -0,0 +1,83 @@
+\documentclass{article}
+\usepackage[fancyhdr,pdf]{latex2man}
+
+\input{common.tex}
+
+\begin{document}
+
+\begin{Name}{3}{unw\_init\_local}{David Mosberger-Tang}{Programming Library}{unw\_init\_local}unw\_init\_local -- initialize cursor for local unwinding
+\end{Name}
+
+\section{Synopsis}
+
+\File{\#include $<$libunwind.h$>$}\\
+
+\Type{int} \Func{unw\_init\_local}(\Type{unw\_cursor\_t~*}\Var{c}, \Type{unw\_context\_t~*}\Var{ctxt});\\
+
+\section{Description}
+
+The \Func{unw\_init\_local}() routine initializes the unwind cursor
+pointed to by \Var{c} with the machine-state in the context structure
+pointed to by \Var{ctxt}. As such, the machine-state pointed to by
+\Var{ctxt} identifies the initial stack frame at which unwinding
+starts. The machine-state must remain valid for the duration for
+which the cursor \Var{c} is in use.
+
+The \Func{unw\_init\_local}() routine can be used only for unwinding in
+the address space of the current process (i.e., for local unwinding).
+For all other cases, \Func{unw\_init\_remote}() must be used instead.
+From a behavioral point of view, the call:
+
+\begin{verbatim}
+ ret = unw_init_local(&cursor, &ucontext);
+\end{verbatim}
+is equivalent to:
+
+\begin{verbatim}
+ ret = unw_init_remote(&cursor, unw_local_addr_space,
+ &ucontext);
+\end{verbatim}
+However, unwind performance may be better when using
+\Func{unw\_init\_local}(). Also, \Func{unw\_init\_local}() is
+available even when \Const{UNW\_LOCAL\_ONLY} has been defined before
+including \File{$<$libunwind.h$>$}, whereas \Func{unw\_init\_remote}()
+is not.
+
+\section{Return Value}
+
+On successful completion, \Func{unw\_init\_local}() returns 0.
+Otherwise the negative value of one of the error-codes below is
+returned.
+
+\section{Thread and Signal Safety}
+
+\Func{unw\_init\_local}() is thread-safe as well as safe to use from a
+signal handler.
+
+\section{Errors}
+
+\begin{Description}
+\item[\Const{UNW\_EINVAL}] \Func{unw\_init\_local}() was called in a
+ version of \Prog{libunwind} which supports remote unwinding only
+ (this normally happens when calling \Func{unw\_init\_local}() for a
+ cross-platform version of \Prog{libunwind}).
+\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
+\item[\Const{UNW\_EBADREG}] A register needed by \Func{unw\_init\_local}()
+ wasn't accessible.
+\end{Description}
+
+\section{See Also}
+
+\SeeAlso{libunwind(3)}, \SeeAlso{unw\_init\_remote(3)}
+
+\section{Author}
+
+\noindent
+David Mosberger-Tang\\
+Hewlett-Packard Labs\\
+Palo-Alto, CA 94304\\
+Email: \Email{davidm@hpl.hp.com}\\
+WWW: \URL{http://www.hpl.hp.com/research/linux/libunwind/}.
+\LatexManEnd
+
+\end{document}