Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

uwx_get_reg(3x) [hpux man page]

uwx_get_reg(3X) 														   uwx_get_reg(3X)

NAME
uwx_get_reg() - read a register from current frame's context SYNOPSIS
DESCRIPTION
is part of the Unwind Express Library for Integrity systems; see uwx(3X). reads the value of a register from the context of the current frame. Parameters env A pointer to an unwind environment object. regid An identifier for the register to be read. This parameter must be one of the following values: The instruction pointer (IP). The stack pointer (SP). The backing store pointer (BSP). This value defines the point in the backing store where the current frame's GR32 would be saved. The current frame marker (CFM) and epilogue counter (ar.ec), combined into one register as they are stored in ar.pfs. The return pointer (RP, the previous frame's IP). The previous stack pointer (PSP, the previous frame's SP). The previous frame state (PFS, the previous frame's CFM and ar.ec). Note that this is not necessarily the same as as the previous frame's state may have been saved to a different register prior to making a function call. Asking for this register will locate the true previous frame state, whether it is cur- rently in ar.pfs or saved in a different register. Predicate registers PR0-PR63. Only the preserved predicates have meaningful values. The NaT bits for GR4-7 in the current frame. The RSE NaT collection register (ar.rnat). The User NaT collection register (ar.unat). The floating-point status register (ar.fpsr). The loop counter register (ar.lc). The previous function state register (ar.pfs). Note that this is not necessarily the same as UWX_REG_PFS, as the previous frame's state may have been saved to a different register prior to making a function call. Asking for this register will return the contents of the ar.pfs register for the current frame. General register GRx. Only registers GR4-GR7 (the preserved GRs) and GR32-GR127 (the stacked GRs) may be read. Branch register BRx. Only registers BR1-BR5 (the preserved BRs) may be read. Floating-point register GRx. Only registers FR2-FR5 and FR16-31 (the preserved FRs) may be read. valp Pointer to the return buffer where the value is written. The buffer must be 16 bytes long for floating-point values, or 8 bytes long for all other values. RETURN VALUE
returns on success. See uwx(3X) for error codes. AUTHOR
The Unwind Express Library was developed by Hewlett-Packard. SEE ALSO
uwx(3X), uwx_add_to_bsp(3X), uwx_find_source_info(3X), uwx_find_symbol(3X), uwx_free(3X), uwx_get_abi_context_code(3X), uwx_get_func- start(3X), uwx_get_module_info(3X), uwx_get_nat(3X), uwx_get_source_info(3X), uwx_get_sym_info(3X), uwx_init(3X), uwx_init_context(3X), uwx_register_alloc_cb(3X), uwx_register_callbacks(3X), uwx_release_symbol_cache(3X), uwx_self_do_context_frame(3X), uwx_self_free_info(3X), uwx_self_init_context(3X), uwx_self_init_info(3X), uwx_set_nofr(3X), uwx_set_remote(3X), uwx_step(3X), uwx_step_inline(3X). Integrity Systems Only uwx_get_reg(3X)

Check Out this Related Man Page

UNW_GET_FPREG(3)					       Programming Library						  UNW_GET_FPREG(3)

NAME
unw_get_fpreg -- get contents of floating-point register SYNOPSIS
#include <libunwind.h> int unw_get_fpreg(unw_cursor_t *cp, unw_regnum_t reg, unw_fpreg_t *valp); DESCRIPTION
The unw_get_fpreg() routine reads the value of floating-point register reg in the stack frame identified by cursor cp and stores the value in the variable pointed to by valp. The register numbering is target-dependent and described in separate manual pages (e.g., libunwind-ia64(3) for the IA-64 target). Further- more, the exact set of accessible registers may depend on the type of frame that cp is referring to. For ordinary stack frames, it is nor- mally possible to access only the preserved (``callee-saved'') registers and frame-related registers (such as the stack-pointer). However, for signal frames (see unw_is_signal_frame(3)), it is usually possible to access all registers. Note that unw_get_fpreg() can only read the contents of floating-point registers. See unw_get_fpreg(3) for a way to read registers which fit in a single word. RETURN VALUE
On successful completion, unw_get_fpreg() returns 0. Otherwise the negative value of one of the error-codes below is returned. THREAD AND SIGNAL SAFETY
unw_get_fpreg() is thread-safe as well as safe to use from a signal handler. ERRORS
UNW_EUNSPEC An unspecified error occurred. UNW_EBADREG An attempt was made to read a register that is either invalid or not accessible in the current frame. In addition, unw_get_fpreg() may return any error returned by the access_mem(), access_reg(), and access_fpreg() call-backs (see unw_cre- ate_addr_space(3)). SEE ALSO
libunwind(3), libunwind-ia64(3), unw_get_reg(3), unw_is_fpreg(3), unw_is_signal_frame(3), unw_set_fpreg(3) AUTHOR
David Mosberger-Tang Email: dmosberger@gmail.com WWW: http://www.nongnu.org/libunwind/. Programming Library 16 August 2007 UNW_GET_FPREG(3)
Man Page