summaryrefslogtreecommitdiff
path: root/src/third_party/unwind/dist/doc/unw_reg_states_iterate.man
blob: e328ad2e38cdff635e41fad901ccfbba2af99a12 (plain)
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
'\" t
.\" Manual page created with latex2man on Wed Aug 16 11:09:44 PDT 2017
.\" NOTE: This file is generated, DO NOT EDIT.
.de Vb
.ft CW
.nf
..
.de Ve
.ft R

.fi
..
.TH "UNW\\_REG\\_STATES\\_ITERATE" "3" "16 August 2017" "Programming Library " "Programming Library "
.SH NAME
unw_reg_states_iterate
\-\- get register state info on current procedure 
.PP
.SH SYNOPSIS

.PP
#include <libunwind.h>
.br
.PP
int
unw_reg_states_iterate(unw_cursor_t *cp,
unw_reg_states_callbackcb,
void *token);
.br
.PP
.SH DESCRIPTION

.PP
The unw_reg_states_iterate()
routine provides 
information about the procedure that created the stack frame 
identified by argument cp\&.
The cb
argument is a pointer 
to a function of type unw_reg_states_callback
which is used to 
return the information. The function unw_reg_states_callback
has the 
following definition: 
.PP
int
( *unw_reg_states_callback)(void *token,
void *reg_states_data,
size_t
reg_states_data_size,
unw_word_t
start_ip,
unw_word_t
end_ip);
.PP
The callback function may be invoked several times for each call of unw_reg_states_iterate\&.
Each call is associcated with a instruction address range and a set of instructions on how to update register values when returning from the procedure in that address range. For each invocation, the arguments to the callback function are: 
.TP
void * token
 The token value passed to unw_reg_states_callback\&.
.br
.TP
void * reg_states_data
 A pointer to data about 
updating register values. This data, or a copy of it, can be passed 
to unw_apply_reg_state\&.
.br
.TP
int reg_states_data_size
 The size of the register update data. 
.br
.TP
unw_word_t start_ip
 The address of the first 
instruction of the address range. 
.br
.TP
unw_word_t end_ip
 The address of the first 
instruction \fIbeyond\fP
the end of the address range. 
.br
.PP
.SH RETURN VALUE

.PP
On successful completion, unw_reg_states_iterate()
returns 
0. If the callback function returns a nonzero value, that indicates 
failure and the function returns immediately. Otherwise the negative 
value of one of the error\-codes below is returned. 
.PP
.SH THREAD AND SIGNAL SAFETY

.PP
unw_reg_states_iterate()
is thread\-safe. If cursor cp
is 
in the local address\-space, this routine is also safe to use from a 
signal handler. 
.PP
.SH ERRORS

.PP
.TP
UNW_EUNSPEC
 An unspecified error occurred. 
.TP
UNW_ENOINFO
 Libunwind
was unable to locate 
unwind\-info for the procedure. 
.TP
UNW_EBADVERSION
 The unwind\-info for the procedure has 
version or format that is not understood by libunwind\&.
.PP
In addition, unw_reg_states_iterate()
may return any error 
returned by the access_mem()
call\-back (see 
unw_create_addr_space(3)).
.PP
.SH SEE ALSO

.PP
libunwind(3),
unw_apply_reg_state(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.