1UNW_SET_FPREG(3)             Programming Library              UNW_SET_FPREG(3)
2
3
4

NAME

6       unw_set_fpreg -- set contents of floating-point register
7

SYNOPSIS

9       #include <libunwind.h>
10
11       int unw_set_fpreg(unw_cursor_t *cp, unw_regnum_t reg, unw_fpreg_t val);
12

DESCRIPTION

14       The unw_set_fpreg() routine sets the value of register reg in the stack
15       frame identified by cursor cp to the value passed in val.
16
17       The register numbering is target-dependent and  described  in  separate
18       manual  pages (e.g., libunwind-ia64(3) for the IA-64 target).  Further‐
19       more, the exact set of accessible registers may depend on the  type  of
20       frame  that  cp  is referring to. For ordinary stack frames, it is nor‐
21       mally possible to access only the preserved  (``callee-saved'')  regis‐
22       ters  and frame-related registers (such as the stack-pointer). However,
23       for signal frames (see unw_is_signal_frame(3)), it is usually  possible
24       to access all registers.
25
26       Note that unw_set_fpreg() can only write the contents of floating-point
27       registers. See unw_set_reg(3) for a way to write registers which fit in
28       a single word.
29

RETURN VALUE

31       On  successful  completion,  unw_set_fpreg()  returns 0.  Otherwise the
32       negative value of one of the error-codes below is returned.
33

THREAD AND SIGNAL SAFETY

35       unw_set_fpreg() is thread-safe as well as safe to  use  from  a  signal
36       handler.
37

ERRORS

39       UNW_EUNSPEC
40               An unspecified error occurred.
41
42       UNW_EBADREG
43               An  attempt was made to write a register that is either invalid
44              or not accessible in the current frame.
45
46       UNW_EREADONLY
47               An attempt was made to write to a read-only register.
48
49       In addition, unw_set_fpreg() may  return  any  error  returned  by  the
50       access_mem(), access_reg(), and access_fpreg() call-backs (see unw_cre‐
51       ate_addr_space(3)).
52

SEE ALSO

54       libunwind(3),  libunwind-ia64(3),  unw_get_fpreg(3),   unw_is_fpreg(3),
55       unw_is_signal_frame(3), unw_set_reg(3)
56

AUTHOR

58       David Mosberger-Tang
59       Email: dmosberger@gmail.com
60       WWW: http://www.nongnu.org/libunwind/.
61
62
63
64Programming Library             16 August 2007                UNW_SET_FPREG(3)
Impressum