blob: aaf7fb25a761eb60bb788c1f8a4e8aff17c2cc22 [file] [log] [blame]
\begin{Name}{3}{unw\_set\_fpreg}{David Mosberger-Tang}{Programming Library}{unw\_set\_fpreg}unw\_set\_fpreg -- set contents of floating-point register
\File{\#include $<$libunwind.h$>$}\\
\Type{int} \Func{unw\_set\_fpreg}(\Type{unw\_cursor\_t~*}\Var{cp}, \Type{unw\_regnum\_t} \Var{reg}, \Type{unw\_fpreg\_t} \Var{val});\\
The \Func{unw\_set\_fpreg}() routine sets the value of register
\Var{reg} in the stack frame identified by cursor \Var{cp} to the
value passed in \Var{val}.
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\_set\_fpreg}() can only write the contents of
floating-point registers. See \Func{unw\_set\_reg}(3) for a way to
write registers which fit in a single word.
\section{Return Value}
On successful completion, \Func{unw\_set\_fpreg}() returns 0.
Otherwise the negative value of one of the error-codes below is
\section{Thread and Signal Safety}
\Func{unw\_set\_fpreg}() is thread-safe as well as safe to use
from a signal handler.
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
\item[\Const{UNW\_EBADREG}] An attempt was made to write a register
that is either invalid or not accessible in the current frame.
\item[\Const{UNW\_EREADONLY}] An attempt was made to write to a
read-only register.
In addition, \Func{unw\_set\_fpreg}() may return any error returned by
the \Func{access\_mem}(), \Func{access\_reg}(), and
\Func{access\_fpreg}() call-backs (see
\section{See Also}
David Mosberger-Tang\\
Email: \Email{}\\
WWW: \URL{}.