unw_get_reg.man 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. '\" t
  2. .\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
  3. .\" NOTE: This file is generated, DO NOT EDIT.
  4. .de Vb
  5. .ft CW
  6. .nf
  7. ..
  8. .de Ve
  9. .ft R
  10. .fi
  11. ..
  12. .TH "UNW\\_GET\\_REG" "3" "16 August 2007" "Programming Library " "Programming Library "
  13. .SH NAME
  14. unw_get_reg
  15. \-\- get register contents
  16. .PP
  17. .SH SYNOPSIS
  18. .PP
  19. #include <libunwind.h>
  20. .br
  21. .PP
  22. int
  23. unw_get_reg(unw_cursor_t *cp,
  24. unw_regnum_t
  25. reg,
  26. unw_word_t *valp);
  27. .br
  28. .PP
  29. .SH DESCRIPTION
  30. .PP
  31. The unw_get_reg()
  32. routine reads the value of register
  33. reg
  34. in the stack frame identified by cursor cp
  35. and stores
  36. the value in the word pointed to by valp\&.
  37. .PP
  38. The register numbering is target\-dependent and described in separate
  39. manual pages (e.g., libunwind\-ia64(3) for the IA\-64 target).
  40. Furthermore, the exact set of accessible registers may depend on the
  41. type of frame that cp
  42. is referring to. For ordinary stack
  43. frames, it is normally possible to access only the preserved
  44. (``callee\-saved\&'') registers and frame\-related registers (such as the
  45. stack\-pointer). However, for signal frames (see
  46. unw_is_signal_frame(3)),
  47. it is usually possible to access
  48. all registers.
  49. .PP
  50. Note that unw_get_reg()
  51. can only read the contents of
  52. registers whose values fit in a single word. See
  53. unw_get_fpreg(3)
  54. for a way to read registers which do not fit
  55. this constraint.
  56. .PP
  57. .SH RETURN VALUE
  58. .PP
  59. On successful completion, unw_get_reg()
  60. returns 0.
  61. Otherwise the negative value of one of the error\-codes below is
  62. returned.
  63. .PP
  64. .SH THREAD AND SIGNAL SAFETY
  65. .PP
  66. unw_get_reg()
  67. is thread\-safe as well as safe to use
  68. from a signal handler.
  69. .PP
  70. .SH ERRORS
  71. .PP
  72. .TP
  73. UNW_EUNSPEC
  74. An unspecified error occurred.
  75. .TP
  76. UNW_EBADREG
  77. An attempt was made to read a register
  78. that is either invalid or not accessible in the current frame.
  79. .PP
  80. In addition, unw_get_reg()
  81. may return any error returned by
  82. the access_mem(),
  83. access_reg(),
  84. and
  85. access_fpreg()
  86. call\-backs (see
  87. unw_create_addr_space(3)).
  88. .PP
  89. .SH SEE ALSO
  90. .PP
  91. libunwind(3),
  92. libunwind\-ia64(3),
  93. unw_get_fpreg(3),
  94. unw_is_signal_frame(3),
  95. unw_set_reg(3)
  96. .PP
  97. .SH AUTHOR
  98. .PP
  99. David Mosberger\-Tang
  100. .br
  101. Email: \fBdmosberger@gmail.com\fP
  102. .br
  103. WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
  104. .\" NOTE: This file is generated, DO NOT EDIT.