2 .\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
3 .\" NOTE: This file is generated, DO NOT EDIT.
13 .TH "UNW\\_GETCONTEXT" "3" "16 August 2007" "Programming Library " "Programming Library "
16 \-\- get initial machine\-state
21 #include <libunwind.h>
25 unw_getcontext(unw_context_t *ucp);
32 routine initializes the context structure
34 with the machine\-state of the call\-site. The
35 exact set of registers stored by unw_getcontext()
37 platform\-specific, but, in general, at least all preserved
38 (``callee\-saved\&'') and all frame\-related registers, such as the
39 stack\-pointer, will be stored.
41 This routine is normally implemented as a macro and applications
42 should not attempt to take its address.
44 .SH PLATFORM\-SPECIFIC NOTES
47 On IA\-64, unw_context_t
48 has a layout that is compatible with
50 and such structures can be initialized with
52 instead of unw_getcontext().
55 true and it is \fInot\fP
56 safe to use structures
57 initialized by unw_getcontext()
58 in places where a structure
59 initialized by getcontext()
60 is expected. The reason for this
61 asymmetry is that unw_getcontext()
62 is optimized for maximum
63 performance and does not, for example, save the signal mask.
68 On successful completion, unw_getcontext()
70 Otherwise, a value of \-1 is returned.
72 .SH THREAD AND SIGNAL SAFETY
76 is thread\-safe as well as safe to use
77 from a signal handler.
90 Email: \fBdmosberger@gmail.com\fP
92 WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
93 .\" NOTE: This file is generated, DO NOT EDIT.