unw_get_proc_info_by_ip.man 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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\\_PROC\\_INFO\\_BY\\_IP" "3" "16 August 2007" "Programming Library " "Programming Library "
  13. .SH NAME
  14. unw_get_proc_info_by_ip
  15. \-\- get procedure info by IP
  16. .PP
  17. .SH SYNOPSIS
  18. .PP
  19. #include <libunwind.h>
  20. .br
  21. .PP
  22. int
  23. unw_get_proc_info_by_ip(unw_addr_space_t as,
  24. unw_word_t ip,
  25. unw_proc_info_t *pip,
  26. void *arg);
  27. .br
  28. .PP
  29. .SH DESCRIPTION
  30. .PP
  31. The unw_get_proc_info_by_ip()
  32. routine returns the same
  33. kind of auxiliary information about a procedure as
  34. unw_get_proc_info(),
  35. except that the info is looked up by
  36. instruction\-pointer (IP) instead of a cursor. This is more flexible
  37. because it is possible to look up the info for an arbitrary procedure,
  38. even if it is not part of the current call\-chain. However, since it
  39. is more flexible, it also tends to run slower (and often much slower)
  40. than unw_get_proc_info().
  41. .PP
  42. The routine expects the followins arguments: as
  43. is the
  44. address\-space in which the instruction\-pointer should be looked up.
  45. For a look\-up in the local address\-space,
  46. unw_local_addr_space
  47. can be passed for this argument.
  48. Argument ip
  49. is the instruction\-pointer for which the procedure
  50. info should be looked up and pip
  51. is a pointer to a structure of
  52. type unw_proc_info_t
  53. which is used to return the info.
  54. Lastly, arg
  55. is the address\-space argument that should be used
  56. when accessing the address\-space. It has the same purpose as the
  57. argument of the same name for unw_init_remote().
  58. When
  59. accessing the local address\-space (first argument is
  60. unw_local_addr_space),
  61. NULL
  62. must be passed for this
  63. argument.
  64. .PP
  65. Note that for the purposes of libunwind,
  66. the code of a
  67. procedure is assumed to occupy a single, contiguous range of
  68. addresses. For this reason, it is alwas possible to describe the
  69. extent of a procedure with the start_ip
  70. and end_ip
  71. members. If a single function/routine is split into multiple,
  72. discontiguous pieces, libunwind
  73. will treat each piece as a
  74. separate procedure.
  75. .PP
  76. .SH RETURN VALUE
  77. .PP
  78. On successful completion, unw_get_proc_info_by_ip()
  79. returns 0. Otherwise the negative value of one of the error\-codes
  80. below is returned.
  81. .PP
  82. .SH THREAD AND SIGNAL SAFETY
  83. .PP
  84. unw_get_proc_info()
  85. is thread\-safe. If the local
  86. address\-space is passed in argument as,
  87. this routine is also
  88. safe to use from a signal handler.
  89. .PP
  90. .SH ERRORS
  91. .PP
  92. .TP
  93. UNW_EUNSPEC
  94. An unspecified error occurred.
  95. .TP
  96. UNW_ENOINFO
  97. Libunwind
  98. was unable to locate
  99. unwind\-info for the procedure.
  100. .TP
  101. UNW_EBADVERSION
  102. The unwind\-info for the procedure has
  103. version or format that is not understood by libunwind\&.
  104. .PP
  105. In addition, unw_get_proc_info()
  106. may return any error
  107. returned by the access_mem()
  108. call\-back (see
  109. unw_create_addr_space(3)).
  110. .PP
  111. .SH SEE ALSO
  112. .PP
  113. libunwind(3),
  114. unw_create_addr_space(3),
  115. unw_get_proc_name(3),
  116. unw_get_proc_info(3),
  117. unw_init_remote(3)
  118. .PP
  119. .SH AUTHOR
  120. .PP
  121. David Mosberger\-Tang
  122. .br
  123. Email: \fBdmosberger@gmail.com\fP
  124. .br
  125. WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
  126. .\" NOTE: This file is generated, DO NOT EDIT.