Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > U

uwx_get_reg(3X)

Integrity Systems Only
HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

uwx_get_reg() — read a register from current frame's context

SYNOPSIS

#include <uwx.h> int uwx_get_reg( struct uwx_env *env, int regid, uint64_t *valp );

DESCRIPTION

uwx_get_reg() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_get_reg() 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:

UWX_REG_IP

The instruction pointer (IP).

UWX_REG_SP

The stack pointer (SP).

UWX_REG_BSP

The backing store pointer (BSP). This value defines the point in the backing store where the current frame's GR32 would be saved.

UWX_REG_CFM

The current frame marker (CFM) and epilogue counter (ar.ec), combined into one register as they are stored in ar.pfs.

UWX_REG_RP

The return pointer (RP, the previous frame's IP).

UWX_REG_PSP

The previous stack pointer (PSP, the previous frame's SP).

UWX_REG_PFS

The previous frame state (PFS, the previous frame's CFM and ar.ec). Note that this is not necessarily the same as UWX_REG_AR_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 locate the true previous frame state, whether it is currently in ar.pfs or saved in a different register.

UWX_REG_PREDS

Predicate registers PR0-PR63. Only the preserved predicates have meaningful values.

UWX_REG_PRIUNAT

The NaT bits for GR4-7 in the current frame.

UWX_REG_AR_RNAT

The RSE NaT collection register (ar.rnat).

UWX_REG_AR_UNAT

The User NaT collection register (ar.unat).

UWX_REG_AR_FPSR

The floating-point status register (ar.fpsr).

UWX_REG_AR_LC

The loop counter register (ar.lc).

UWX_REG_AR_PFS

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.

UWX_REG_GR(x)

General register GRx. Only registers GR4-GR7 (the preserved GRs) and GR32-GR127 (the stacked GRs) may be read.

UWX_REG_BR(x)

Branch register BRx. Only registers BR1-BR5 (the preserved BRs) may be read.

UWX_REG_FR(x)

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

uwx_get_reg() returns UWX_OK on success. See uwx(3X) for error codes.

AUTHOR

The Unwind Express Library was developed by Hewlett-Packard.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.