unw_init_local.man 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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\\_INIT\\_LOCAL" "3" "16 August 2007" "Programming Library " "Programming Library "
  13. .SH NAME
  14. unw_init_local
  15. \-\- initialize cursor for local unwinding
  16. .PP
  17. .SH SYNOPSIS
  18. .PP
  19. #include <libunwind.h>
  20. .br
  21. .PP
  22. int
  23. unw_init_local(unw_cursor_t *c,
  24. unw_context_t *ctxt);
  25. .br
  26. .PP
  27. .SH DESCRIPTION
  28. .PP
  29. The unw_init_local()
  30. routine initializes the unwind cursor
  31. pointed to by c
  32. with the machine\-state in the context structure
  33. pointed to by ctxt\&.
  34. As such, the machine\-state pointed to by
  35. ctxt
  36. identifies the initial stack frame at which unwinding
  37. starts. The machine\-state must remain valid for the duration for
  38. which the cursor c
  39. is in use.
  40. .PP
  41. The unw_init_local()
  42. routine can be used only for unwinding in
  43. the address space of the current process (i.e., for local unwinding).
  44. For all other cases, unw_init_remote()
  45. must be used instead.
  46. From a behavioral point of view, the call:
  47. .PP
  48. .Vb
  49. ret = unw_init_local(&cursor, &ucontext);
  50. .Ve
  51. is equivalent to:
  52. .PP
  53. .Vb
  54. ret = unw_init_remote(&cursor, unw_local_addr_space,
  55. &ucontext);
  56. .Ve
  57. However, unwind performance may be better when using
  58. unw_init_local().
  59. Also, unw_init_local()
  60. is
  61. available even when UNW_LOCAL_ONLY
  62. has been defined before
  63. including <libunwind.h>,
  64. whereas unw_init_remote()
  65. is not.
  66. .PP
  67. .SH RETURN VALUE
  68. .PP
  69. On successful completion, unw_init_local()
  70. returns 0.
  71. Otherwise the negative value of one of the error\-codes below is
  72. returned.
  73. .PP
  74. .SH THREAD AND SIGNAL SAFETY
  75. .PP
  76. unw_init_local()
  77. is thread\-safe as well as safe to use from a
  78. signal handler.
  79. .PP
  80. .SH ERRORS
  81. .PP
  82. .TP
  83. UNW_EINVAL
  84. unw_init_local()
  85. was called in a
  86. version of libunwind
  87. which supports remote unwinding only
  88. (this normally happens when calling unw_init_local()
  89. for a
  90. cross\-platform version of libunwind).
  91. .TP
  92. UNW_EUNSPEC
  93. An unspecified error occurred.
  94. .TP
  95. UNW_EBADREG
  96. A register needed by unw_init_local()
  97. wasn\&'t accessible.
  98. .PP
  99. .SH SEE ALSO
  100. .PP
  101. libunwind(3),
  102. unw_init_remote(3)
  103. .PP
  104. .SH AUTHOR
  105. .PP
  106. David Mosberger\-Tang
  107. .br
  108. Email: \fBdmosberger@gmail.com\fP
  109. .br
  110. WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
  111. .\" NOTE: This file is generated, DO NOT EDIT.