File: unw_init_local.man

package info (click to toggle)
android-platform-external-libunwind 8.1.0%2Br23-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,264 kB
  • sloc: ansic: 34,068; sh: 6,931; asm: 1,910; makefile: 841; cpp: 137
file content (119 lines) | stat: -rw-r--r-- 2,327 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
'\" t
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
.\" NOTE: This file is generated, DO NOT EDIT.
.de Vb
.ft CW
.nf
..
.de Ve
.ft R

.fi
..
.TH "UNW\\_INIT\\_LOCAL" "3" "16 August 2007" "Programming Library " "Programming Library "
.SH NAME
unw_init_local
\-\- initialize cursor for local unwinding 
.PP
.SH SYNOPSIS

.PP
#include <libunwind.h>
.br
.PP
int
unw_init_local(unw_cursor_t *c,
unw_context_t *ctxt);
.br
.PP
.SH DESCRIPTION

.PP
The unw_init_local()
routine initializes the unwind cursor 
pointed to by c
with the machine\-state in the context structure 
pointed to by ctxt\&.
As such, the machine\-state pointed to by 
ctxt
identifies the initial stack frame at which unwinding 
starts. The machine\-state must remain valid for the duration for 
which the cursor c
is in use. 
.PP
The unw_init_local()
routine can be used only for unwinding in 
the address space of the current process (i.e., for local unwinding). 
For all other cases, unw_init_remote()
must be used instead. 
From a behavioral point of view, the call: 
.PP
.Vb
    ret = unw_init_local(&cursor, &ucontext);
.Ve
is equivalent to: 
.PP
.Vb
    ret = unw_init_remote(&cursor, unw_local_addr_space,
                          &ucontext);
.Ve
However, unwind performance may be better when using 
unw_init_local().
Also, unw_init_local()
is 
available even when UNW_LOCAL_ONLY
has been defined before 
including <libunwind.h>,
whereas unw_init_remote()
is not. 
.PP
.SH RETURN VALUE

.PP
On successful completion, unw_init_local()
returns 0. 
Otherwise the negative value of one of the error\-codes below is 
returned. 
.PP
.SH THREAD AND SIGNAL SAFETY

.PP
unw_init_local()
is thread\-safe as well as safe to use from a 
signal handler. 
.PP
.SH ERRORS

.PP
.TP
UNW_EINVAL
 unw_init_local()
was called in a 
version of libunwind
which supports remote unwinding only 
(this normally happens when calling unw_init_local()
for a 
cross\-platform version of libunwind).
.TP
UNW_EUNSPEC
 An unspecified error occurred. 
.TP
UNW_EBADREG
 A register needed by unw_init_local()
wasn\&'t accessible. 
.PP
.SH SEE ALSO

.PP
libunwind(3),
unw_init_remote(3)
.PP
.SH AUTHOR

.PP
David Mosberger\-Tang
.br
Email: \fBdmosberger@gmail.com\fP
.br
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
.\" NOTE: This file is generated, DO NOT EDIT.