summaryrefslogtreecommitdiff
path: root/doc/unw_get_fpreg.tex
blob: 18544cdbc1471e4721d29d576a11d4e0e07106ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
\documentclass{article}
\usepackage[fancyhdr,pdf]{latex2man}

\input{common.tex}

\begin{document}

\begin{Name}{3}{unw\_get\_fpreg}{David Mosberger-Tang}{Programming Library}{unw\_get\_fpreg}unw\_get\_fpreg -- get contents of floating-point register
\end{Name}

\section{Synopsis}

\File{\#include $<$libunwind.h$>$}\\

\Type{int} \Func{unw\_get\_fpreg}(\Type{unw\_cursor\_t~*}\Var{cp}, \Type{unw\_regnum\_t} \Var{reg}, \Type{unw\_fpreg\_t~*}\Var{valp});\\

\section{Description}

The \Func{unw\_get\_fpreg}() routine reads the value of floating-point
register \Var{reg} in the stack frame identified by cursor \Var{cp}
and stores the value in the variable pointed to by \Var{valp}.

The register numbering is target-dependent and described in separate
manual pages (e.g., libunwind-ia64(3) for the IA-64 target).
Furthermore, the exact set of accessible registers may depend on the
type of frame that \Var{cp} is referring to.  For ordinary stack
frames, it is normally possible to access only the preserved
(``callee-saved'') registers and frame-related registers (such as the
stack-pointer).  However, for signal frames (see
\Func{unw\_is\_signal\_frame}(3)), it is usually possible to access
all registers.

Note that \Func{unw\_get\_fpreg}() can only read the contents of
floating-point registers.  See \Func{unw\_get\_fpreg}(3) for a way to
read registers which fit in a single word.

\section{Return Value}

On successful completion, \Func{unw\_get\_fpreg}() returns 0.
Otherwise the negative value of one of the error-codes below is
returned.

\section{Thread and Signal Safety}

\Func{unw\_get\_fpreg}() is thread-safe as well as safe to use
from a signal handler.

\section{Errors}

\begin{Description}
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
\item[\Const{UNW\_EBADREG}] An attempt was made to read a register
  that is either invalid or not accessible in the current frame.
\end{Description}
In addition, \Func{unw\_get\_fpreg}() may return any error returned by
the \Func{access\_mem}(), \Func{access\_reg}(), and
\Func{access\_fpreg}() call-backs (see
\Func{unw\_create\_addr\_space}(3)).

\section{See Also}

\SeeAlso{libunwind(3)},
\SeeAlso{libunwind-ia64(3)},
\SeeAlso{unw\_get\_reg(3)},
\SeeAlso{unw\_is\_fpreg(3)},
\SeeAlso{unw\_is\_signal\_frame(3)},
\SeeAlso{unw\_set\_fpreg(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}