Initial import
[external/libunwind.git] / doc / unw_backtrace.man
1 '\" t
2 .\" Manual page created with latex2man on Fri Aug 31 13:39:04 EEST 2012
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
11 .fi
12 ..
13 .TH "UNW\\_BACKTRACE" "3" "31 August 2012" "Programming Library " "Programming Library "
14 .SH NAME
15 unw_backtrace
16 \-\- return backtrace for the calling program 
17 .PP
18 .SH SYNOPSIS
19
20 .PP
21 #include <libunwind.h>
22 .br
23 .PP
24 int
25 unw_backtrace(void **buffer,
26 int size);
27 .br
28 .PP
29 #include <execinfo.h>
30 .br
31 .PP
32 int
33 backtrace(void **buffer,
34 int size);
35 .br
36 .PP
37 .SH DESCRIPTION
38
39 .PP
40 unw_backtrace()
41 is a convenient routine for obtaining the backtrace for 
42 the calling program. The routine fills up to size
43 addresses in the array 
44 pointed by buffer\&.
45 The routine is only available for local unwinding. 
46 .PP
47 Note that many (but not all) systems provide practically identical function 
48 called backtrace().
49 The prototype for this function is usually obtained 
50 by including the <execinfo.h>
51 header file \-\- a prototype for 
52 backtrace()
53 is not provided by libunwind\&.
54 libunwind
55 weakly 
56 aliases backtrace()
57 to unw_backtrace(),
58 so when a program 
59 calling backtrace()
60 is linked against libunwind,
61 it may end up 
62 calling unw_backtrace().
63 .PP
64 .SH RETURN VALUE
65
66 .PP
67 The routine returns the number of addresses stored in the array pointed by 
68 buffer\&.
69 The return value may be zero to indicate that no addresses were 
70 stored. 
71 .PP
72 .SH SEE ALSO
73
74 .PP
75 libunwind(3),
76 unw_step(3)
77 .PP
78 .SH AUTHOR
79
80 .PP
81 David Mosberger\-Tang
82 .br
83 Email: \fBdmosberger@gmail.com\fP
84 .br
85 WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
86 .\" NOTE: This file is generated, DO NOT EDIT.