unw_get_proc_info.man 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. '\" t
  2. .\" Manual page created with latex2man on Thu Aug 16 09:44:44 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\\_PROC\\_INFO" "3" "16 August 2007" "Programming Library " "Programming Library "
  13. .SH NAME
  14. unw_get_proc_info
  15. \-\- get info on current procedure
  16. .PP
  17. .SH SYNOPSIS
  18. .PP
  19. #include <libunwind.h>
  20. .br
  21. .PP
  22. int
  23. unw_get_proc_info(unw_cursor_t *cp,
  24. unw_proc_info_t *pip);
  25. .br
  26. .PP
  27. .SH DESCRIPTION
  28. .PP
  29. The unw_get_proc_info()
  30. routine returns auxiliary
  31. information about the procedure that created the stack frame
  32. identified by argument cp\&.
  33. The pip
  34. argument is a pointer
  35. to a structure of type unw_proc_info_t
  36. which is used to
  37. return the information. The unw_proc_info_t
  38. has the
  39. following members:
  40. .TP
  41. unw_word_t start_ip
  42. The address of the first
  43. instruction of the procedure. If this address cannot be determined
  44. (e.g., due to lack of unwind information), the start_ip
  45. member is cleared to 0.
  46. .br
  47. .TP
  48. unw_word_t end_ip
  49. The address of the first
  50. instruction \fIbeyond\fP
  51. the end of the procedure. If this address
  52. cannot be determined (e.g., due to lack of unwind information),
  53. the end_ip
  54. member is cleared to 0.
  55. .br
  56. .TP
  57. unw_word_t lsda
  58. The address of the
  59. language\-specific data\-area (LSDA). This area normally contains
  60. language\-specific information needed during exception handling. If
  61. the procedure has no such area, this member is cleared to 0.
  62. .br
  63. .TP
  64. unw_word_t handler
  65. The address of the exception
  66. handler routine. This is sometimes called the \fIpersonality\fP
  67. routine. If the procedure does not define
  68. a personality routine, the handler
  69. member is cleared to 0.
  70. .br
  71. .TP
  72. unw_word_t gp
  73. The global\-pointer of the
  74. procedure. On platforms that do not use a global pointer, this
  75. member may contain an undefined value. On all other platforms, it
  76. must be set either to the correct global\-pointer value of the
  77. procedure or to 0 if the proper global\-pointer cannot be
  78. obtained for some reason.
  79. .br
  80. .TP
  81. unw_word_t flags
  82. A set of flags. There are
  83. currently no target\-independent flags. For the IA\-64 target, the
  84. flag UNW_PI_FLAG_IA64_RBS_SWITCH
  85. is set if the
  86. procedure may switch the register\-backing store.
  87. .br
  88. .TP
  89. int format
  90. The format of the unwind\-info for this
  91. procedure. If the unwind\-info consists of dynamic procedure info,
  92. format
  93. is equal to UNW_INFO_FORMAT_DYNAMIC\&.
  94. If the
  95. unwind\-info consists of a (target\-specific) unwind table, it is
  96. equal to to UNW_INFO_FORMAT_TABLE\&.
  97. All other values are
  98. reserved for future use by libunwind\&.
  99. This member exists
  100. for use by the find_proc_info()
  101. call\-back (see
  102. unw_create_addr_space(3)).
  103. The
  104. unw_get_proc_info()
  105. routine
  106. may return an undefined value in this member.
  107. .br
  108. .TP
  109. int unwind_info_size
  110. The size of the unwind\-info
  111. in bytes. This member exists for use by the
  112. find_proc_info()
  113. call\-back (see
  114. unw_create_addr_space(3)).
  115. The
  116. unw_get_proc_info()
  117. routine
  118. may return an undefined value in this member.
  119. .br
  120. .TP
  121. void *unwind_info
  122. The pointer to the unwind\-info.
  123. If no unwind info is available, this member must be set to
  124. NULL\&.
  125. This member exists for use by the
  126. find_proc_info()
  127. call\-back (see
  128. unw_create_addr_space(3)).
  129. The
  130. unw_get_proc_info()
  131. routine
  132. may return an undefined value in this member.
  133. .br
  134. .PP
  135. Note that for the purposes of libunwind,
  136. the code of a
  137. procedure is assumed to occupy a single, contiguous range of
  138. addresses. For this reason, it is alwas possible to describe the
  139. extent of a procedure with the start_ip
  140. and end_ip
  141. members. If a single function/routine is split into multiple,
  142. discontiguous pieces, libunwind
  143. will treat each piece as a
  144. separate procedure.
  145. .PP
  146. .SH RETURN VALUE
  147. .PP
  148. On successful completion, unw_get_proc_info()
  149. returns 0.
  150. Otherwise the negative value of one of the error\-codes below is
  151. returned.
  152. .PP
  153. .SH THREAD AND SIGNAL SAFETY
  154. .PP
  155. unw_get_proc_info()
  156. is thread\-safe. If cursor cp
  157. is
  158. in the local address\-space, this routine is also safe to use from a
  159. signal handler.
  160. .PP
  161. .SH ERRORS
  162. .PP
  163. .TP
  164. UNW_EUNSPEC
  165. An unspecified error occurred.
  166. .TP
  167. UNW_ENOINFO
  168. Libunwind
  169. was unable to locate
  170. unwind\-info for the procedure.
  171. .TP
  172. UNW_EBADVERSION
  173. The unwind\-info for the procedure has
  174. version or format that is not understood by libunwind\&.
  175. .PP
  176. In addition, unw_get_proc_info()
  177. may return any error
  178. returned by the access_mem()
  179. call\-back (see
  180. unw_create_addr_space(3)).
  181. .PP
  182. .SH SEE ALSO
  183. .PP
  184. libunwind(3),
  185. unw_create_addr_space(3),
  186. unw_get_proc_name(3)
  187. .PP
  188. .SH AUTHOR
  189. .PP
  190. David Mosberger\-Tang
  191. .br
  192. Email: \fBdmosberger@gmail.com\fP
  193. .br
  194. WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
  195. .\" NOTE: This file is generated, DO NOT EDIT.