unw_set_reg.man 2.2 KB

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