blob: 83e8bb43b64f4bd6c4e8143fc7df49da4b86a7a6 [file] [log] [blame]
mostang.com!davidm9eb9f312003-04-01 07:19:34 +00001'\" t
David Mosberger-Tang75f34cc2007-08-22 12:49:08 -06002.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
mostang.com!davidm9eb9f312003-04-01 07:19:34 +00003.\" 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..
David Mosberger-Tang75f34cc2007-08-22 12:49:08 -060013.TH "UNW\\_GET\\_REG" "3" "16 August 2007" "Programming Library " "Programming Library "
mostang.com!davidm9eb9f312003-04-01 07:19:34 +000014.SH NAME
15unw_get_reg
16\-\- get register contents
17.PP
18.SH SYNOPSIS
19
20.PP
21#include <libunwind.h>
22.br
23.PP
24int
25unw_get_reg(unw_cursor_t *cp,
26unw_regnum_t
27reg,
28unw_word_t *valp);
29.br
30.PP
31.SH DESCRIPTION
32
33.PP
34The unw_get_reg()
35routine reads the value of register
36reg
37in the stack frame identified by cursor cp
38and stores
39the value in the word pointed to by valp\&.
40.PP
41The register numbering is target\-dependent and described in separate
42manual pages (e.g., libunwind\-ia64(3) for the IA\-64 target).
43Furthermore, the exact set of accessible registers may depend on the
44type of frame that cp
45is referring to. For ordinary stack
46frames, it is normally possible to access only the preserved
47(``callee\-saved\&'') registers and frame\-related registers (such as the
48stack\-pointer). However, for signal frames (see
49unw_is_signal_frame(3)),
50it is usually possible to access
51all registers.
52.PP
53Note that unw_get_reg()
54can only read the contents of
55registers whose values fit in a single word. See
56unw_get_fpreg(3)
57for a way to read registers which do not fit
58this constraint.
59.PP
60.SH RETURN VALUE
61
62.PP
63On successful completion, unw_get_reg()
64returns 0.
65Otherwise the negative value of one of the error\-codes below is
66returned.
67.PP
68.SH THREAD AND SIGNAL SAFETY
69
70.PP
71unw_get_reg()
72is thread\-safe as well as safe to use
73from a signal handler.
74.PP
75.SH ERRORS
76
77.PP
78.TP
79UNW_EUNSPEC
80 An unspecified error occurred.
81.TP
82UNW_EBADREG
83 An attempt was made to read a register
84that is either invalid or not accessible in the current frame.
85.PP
86In addition, unw_get_reg()
87may return any error returned by
88the access_mem(),
89access_reg(),
90and
91access_fpreg()
92call\-backs (see
93unw_create_addr_space(3)).
94.PP
95.SH SEE ALSO
96
97.PP
98libunwind(3),
99libunwind\-ia64(3),
100unw_get_fpreg(3),
101unw_is_signal_frame(3),
102unw_set_reg(3)
103.PP
104.SH AUTHOR
105
106.PP
107David Mosberger\-Tang
mostang.com!davidm9eb9f312003-04-01 07:19:34 +0000108.br
David Mosberger-Tang75f34cc2007-08-22 12:49:08 -0600109Email: \fBdmosberger@gmail.com\fP
110.br
111WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
mostang.com!davidm9eb9f312003-04-01 07:19:34 +0000112.\" NOTE: This file is generated, DO NOT EDIT.