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\\_GET\\_PROC\\_NAME" "3" "16 August 2007" "Programming Library " "Programming Library "
16 \-\- get name of current procedure
21 #include <libunwind.h>
25 unw_get_proc_name(unw_cursor_t *cp,
35 The unw_get_proc_name()
36 routine returns the name of the
37 procedure that created the stack frame identified by argument
40 argument is a pointer to a character buffer
42 bytes long. This buffer is used to return
43 the name of the procedure. The offp
44 argument is a pointer to a
45 word that is used to return the byte\-offset of the instruction\-pointer
46 saved in the stack frame identified by cp,
48 of the procedure. For example, if procedure foo()
50 address 0x40003000, then invoking unw_get_proc_name()
52 stack frame with an instruction\-pointer value of 0x40003080 would
53 return a value of 0x80 in the word pointed to by offp
55 the procedure is at least 0x80 bytes long).
57 Note that on some platforms there is no reliable way to distinguish
58 between procedure names and ordinary labels. Furthermore, if symbol
59 information has been stripped from a program, procedure names may be
60 completely unavailable or may be limited to those exported via a
61 dynamic symbol table. In such cases, unw_get_proc_name()
62 may return the name of a label or a preceeding (nearby) procedure.
63 However, the offset returned through offp
65 the returned name, which ensures that the value (address) of the
66 returned name plus the returned offset will always be equal to the
67 instruction\-pointer of the stack frame identified by cp\&.
72 On successful completion, unw_get_proc_name()
74 Otherwise the negative value of one of the error\-codes below is
77 .SH THREAD AND SIGNAL SAFETY
81 is thread\-safe. If cursor cp
83 in the local address\-space, this routine is also safe to use from a
91 An unspecified error occurred.
95 was unable to determine
96 the name of the procedure.
99 The procedure name is too long to fit
100 in the buffer provided. A truncated version of the name has been
103 In addition, unw_get_proc_name()
105 returned by the access_mem()
107 unw_create_addr_space(3)).
118 David Mosberger\-Tang
120 Email: \fBdmosberger@gmail.com\fP
122 WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
123 .\" NOTE: This file is generated, DO NOT EDIT.