unw_set_fpreg.tex 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. \documentclass{article}
  2. \usepackage[fancyhdr,pdf]{latex2man}
  3. \input{common.tex}
  4. \begin{document}
  5. \begin{Name}{3}{unw\_set\_fpreg}{David Mosberger-Tang}{Programming Library}{unw\_set\_fpreg}unw\_set\_fpreg -- set contents of floating-point register
  6. \end{Name}
  7. \section{Synopsis}
  8. \File{\#include $<$libunwind.h$>$}\\
  9. \Type{int} \Func{unw\_set\_fpreg}(\Type{unw\_cursor\_t~*}\Var{cp}, \Type{unw\_regnum\_t} \Var{reg}, \Type{unw\_fpreg\_t} \Var{val});\\
  10. \section{Description}
  11. The \Func{unw\_set\_fpreg}() routine sets the value of register
  12. \Var{reg} in the stack frame identified by cursor \Var{cp} to the
  13. value passed in \Var{val}.
  14. The register numbering is target-dependent and described in separate
  15. manual pages (e.g., libunwind-ia64(3) for the IA-64 target).
  16. Furthermore, the exact set of accessible registers may depend on the
  17. type of frame that \Var{cp} is referring to. For ordinary stack
  18. frames, it is normally possible to access only the preserved
  19. (``callee-saved'') registers and frame-related registers (such as the
  20. stack-pointer). However, for signal frames (see
  21. \Func{unw\_is\_signal\_frame}(3)), it is usually possible to access
  22. all registers.
  23. Note that \Func{unw\_set\_fpreg}() can only write the contents of
  24. floating-point registers. See \Func{unw\_set\_reg}(3) for a way to
  25. write registers which fit in a single word.
  26. \section{Return Value}
  27. On successful completion, \Func{unw\_set\_fpreg}() returns 0.
  28. Otherwise the negative value of one of the error-codes below is
  29. returned.
  30. \section{Thread and Signal Safety}
  31. \Func{unw\_set\_fpreg}() is thread-safe as well as safe to use
  32. from a signal handler.
  33. \section{Errors}
  34. \begin{Description}
  35. \item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
  36. \item[\Const{UNW\_EBADREG}] An attempt was made to write a register
  37. that is either invalid or not accessible in the current frame.
  38. \item[\Const{UNW\_EREADONLY}] An attempt was made to write to a
  39. read-only register.
  40. \end{Description}
  41. In addition, \Func{unw\_set\_fpreg}() may return any error returned by
  42. the \Func{access\_mem}(), \Func{access\_reg}(), and
  43. \Func{access\_fpreg}() call-backs (see
  44. \Func{unw\_create\_addr\_space}(3)).
  45. \section{See Also}
  46. \SeeAlso{libunwind(3)},
  47. \SeeAlso{libunwind-ia64(3)},
  48. \SeeAlso{unw\_get\_fpreg(3)},
  49. \SeeAlso{unw\_is\_fpreg(3)},
  50. \SeeAlso{unw\_is\_signal\_frame(3)},
  51. \SeeAlso{unw\_set\_reg(3)}
  52. \section{Author}
  53. \noindent
  54. David Mosberger-Tang\\
  55. Email: \Email{dmosberger@gmail.com}\\
  56. WWW: \URL{http://www.nongnu.org/libunwind/}.
  57. \LatexManEnd
  58. \end{document}