unw_get_fpreg.tex 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. \documentclass{article}
  2. \usepackage[fancyhdr,pdf]{latex2man}
  3. \input{common.tex}
  4. \begin{document}
  5. \begin{Name}{3}{unw\_get\_fpreg}{David Mosberger-Tang}{Programming Library}{unw\_get\_fpreg}unw\_get\_fpreg -- get contents of floating-point register
  6. \end{Name}
  7. \section{Synopsis}
  8. \File{\#include $<$libunwind.h$>$}\\
  9. \Type{int} \Func{unw\_get\_fpreg}(\Type{unw\_cursor\_t~*}\Var{cp}, \Type{unw\_regnum\_t} \Var{reg}, \Type{unw\_fpreg\_t~*}\Var{valp});\\
  10. \section{Description}
  11. The \Func{unw\_get\_fpreg}() routine reads the value of floating-point
  12. register \Var{reg} in the stack frame identified by cursor \Var{cp}
  13. and stores the value in the variable pointed to by \Var{valp}.
  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\_get\_fpreg}() can only read the contents of
  24. floating-point registers. See \Func{unw\_get\_fpreg}(3) for a way to
  25. read registers which fit in a single word.
  26. \section{Return Value}
  27. On successful completion, \Func{unw\_get\_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\_get\_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 read a register
  37. that is either invalid or not accessible in the current frame.
  38. \end{Description}
  39. In addition, \Func{unw\_get\_fpreg}() may return any error returned by
  40. the \Func{access\_mem}(), \Func{access\_reg}(), and
  41. \Func{access\_fpreg}() call-backs (see
  42. \Func{unw\_create\_addr\_space}(3)).
  43. \section{See Also}
  44. \SeeAlso{libunwind(3)},
  45. \SeeAlso{libunwind-ia64(3)},
  46. \SeeAlso{unw\_get\_reg(3)},
  47. \SeeAlso{unw\_is\_fpreg(3)},
  48. \SeeAlso{unw\_is\_signal\_frame(3)},
  49. \SeeAlso{unw\_set\_fpreg(3)}
  50. \section{Author}
  51. \noindent
  52. David Mosberger-Tang\\
  53. Email: \Email{dmosberger@gmail.com}\\
  54. WWW: \URL{http://www.nongnu.org/libunwind/}.
  55. \LatexManEnd
  56. \end{document}