HP-UX Reference (11i v2 04/09) - 3 Library Functions N-Z (vol 7)
u
uc_access(3) uc_access(3)
(Itanium(R)-based platforms only)
int __uc_get_ar_unat(const ucontext_t *ucp, uint64_t *value);
int __uc_set_ar_unat(ucontext_t *ucp, uint64_t value);
int __uc_get_ar_fpsr(const ucontext_t *ucp, fpsr_t *value);
int __uc_set_ar_fpsr(ucontext_t *ucp, fpsr_t value);
int __uc_get_ar_pfs(const ucontext_t *ucp, pfs_t *value);
int __uc_set_ar_pfs(ucontext_t *ucp, pfs_t value);
int __uc_get_ar_lc(const ucontext_t *ucp, uint64_t *value);
int __uc_set_ar_lc(ucontext_t *ucp, uint64_t value);
int __uc_get_ar_ec(const ucontext_t *ucp, uint64_t *value);
int __uc_set_ar_ec(ucontext_t *ucp, uint64_t value);
int __uc_get_ed(const ucontext_t *ucp, uint64_t *value);
int __uc_set_ed(ucontext_t *ucp, uint64_t value);
int __uc_get_rsebs(const ucontext_t *ucp, uint64_t *addr, unsigned int
count, uint64_t values[]);
int __uc_set_rsebs(ucontext_t *ucp, uint64_t *addr, unsigned int count,
const uint64_t values[]);
int __uc_get_rsebs64(const ucontext_t *ucp, ptr64_t addr, unsigned int
count, uint64_t values[]);
int __uc_set_rsebs64(ucontext_t *ucp, ptr64_t addr, unsigned int count,
const uint64_t values[]);
int __uc_get_ar(const ucontext_t *ucp, unsigned int reg, uint64_t *value);
int __uc_set_ar(ucontext_t *ucp, unsigned int reg, uint64_t value);
int __uc_get_cr(const ucontext_t *ucp, unsigned int reg, uint64_t *value);
DESCRIPTION
The Ucontext Access interfaces allow an application to access Itanium(R)-based register state contained
inside the opaque mcontext_t structure within the ucontext_t user context structure.
In all these interfaces,
ucp is a pointer to a ucontext_t passed to the application as the third argu-
ment to a signal handler, allocated by the user and filled in with getcontext() or read from an appli-
cation core file.
Because a syscall occurs on a function call boundary, contexts created in a syscall omit scratch registers
and other specific values as detailed below.
To use any of these functions, link in the ucontext access library by specifying
-luca on the compiler or
linker command line.
Individual Interface Descriptions
__uc_get_reason()
Returns (in the location referenced by the value argument) zero if the context was created in
a syscall or a non-zero value if the context was created while handling an interruption that
occurred while running user code.
__uc_get_grs()
Returns (in the values[] array) the saved values of the Static General Registers in the
range first through first + count-1 inclusive, and (in the NaT argument) the
corresponding NaT bit values. Only Static General Registers (GR1-GR31) may be read with
this interface. Stacked General Registers (GR32-GR127) must be read from the RSE backing
store, or the RSE Backing Store overflow area. (See __uc_get_rsebs() below.)
The NaT bits corresponding to the requested General Registers will be in the corresponding
bits of NaT. For example,
NaT&(1<<5)represents the Nat Bit for GR5.
If the context was created in a syscall, scratch registers (GR2, GR3 and GR14-GR31) will read
as
values[X]==0, (NaT >> X)&&1==1.
Section 3−−1126 Hewlett-Packard Company − 2 − HP-UX 11i Version 2: September 2004