_UNW_currentContext.3x (2010 09)
_
_UNW_currentContext(3X) _UNW_currentContext(3X)
(Integrity Systems Only)
meaning the client can now use the _UNW_set routines to initialize values in the
_Unwind_Context
.
The Init state is discussed further in unwind(5).
_UNW_setGR() initializes the value of numbered general register num to value in the
_Unwind_Context
pointed to by parameter p. The NAT bit for the register is set to
_UNW_FALSE.
_UNW_setGR_NaT()
initializes the value of a numbered general register num to value in the
_Unwind_Context
pointed to by parameter p. The NAT bit for the register is set to
NaTval
_UNW_setFR() initializes the value of a numbered floating point register, num, in the
_Unwind_Context
pointed to by parameter p, to the value image represented in parameters
first_container and second_container. These two containers represent the two consecutive double words
of the Floating point register Spill/Fill memory format. See Intel IA-64 Architecture Software Developer’s
Manual, Volume 1: IA-64 Application Architecture , "Section 5.3: Floating Point Instructions".
_UNW_setBR() initializes the value of numbered branch register num to value in the
_Unwind_Context
pointed to by parameter p.
_UNW_setAR() initializes the value of enumerated application register num to value in the
_Unwind_Context
pointed to by parameter p. The enumeration type _UNW_AppReg
is used for
accessing application registers.
_UNW_setPR() initializes the value of a numbered predicate register num, in the
_Unwind_Context
pointed to by parameter p,tovalue, which is one of _UNW_TRUE or _UNW_FALSE.
_UNW_setPreds() initializes the value of all predicate registers in the
_Unwind_Context pointed
to by parameter p to a representation passed in value . value contains the contents of each predicate
register in the bit corresponding corresponding to the predicate register number; for instance, bit 63 con-
tains the contents (1 or 0) for predicate register 63.
_UNW_setIP() initializes the value of the instruction pointer to value in the _Unwind_Context
pointed to by parameter p . value must be a full 64-bit address. That means that any 32-bit pointer
values from the 32-bit address space must be swizzled before being passed to _UNW_setIP(). See
Itanium Processor Family Runtime Architecture Supplement: 32-Bit Runtime Architecture for HP-UX,
"Section 1: Memory Model".
_UNW_setCFM() initializes the value of the current frame marker (CFM) to value in the
_Unwind_Context pointed to by parameter p. Refer to Intel IA-64 Architecture Software Developer’s
Manual, Volume 1: IA-64 Application Architecture , "Section 3.1.7 Current Frame Marker". The current
frame marker contains the sizes of the various portions of the stack frame. It also specifies three Register
Rename Base values (used in register rotation). The current frame marker is not an architecturally visi-
ble value. It is used by the unwind library while initializing an
_Unwind_Context
for unwinding to
provide the initial
_Unwind_Context
with a picture of the Register Stack Engine (RSE) (specifically
how many stacked general registers registers from the range GR32 to GR127 are in the current frame)
and any register base rotations in effect. A client program can construct a current frame marker value by
several means:
• A procedure wanting to unwind itself can call a "current state" collection procedure whose pur-
pose is to fill in an
_Unwind_Context structure which describes its own state. That pro-
cedure (if written in assembly) can use knowledge of its own register usage to craft the current
frame marker value.
• A tool (such as a debugger) wishing to unwind a process other than itself that it has interrupted
(for instance, by setting a break point) can piece together the current frame marker value from
the interruption context produced by the interruption event. See Intel IA-64 Architecture
Software Developer’s Manual, Volume 2: IA-64 System Architecture , "Chapter 5: IA-64 Interrup-
tions".
_UNW_GR_PhysicalNumber(), _UNW_FR_PhysicalNumber()
, and
_UNW_PR_PhysicalNumber() for the _Unwind_Context pointed to by parameter p return the
physical register number corresponding to the logical register number, logical_num . The distinction
between physical and logical register number is explained below in subsection INTERACTION
BETWEEN INITIALIZER FUNCTIONS.
INTERACTION BETWEEN INITIALIZER FUNCTIONS
The stack unwind library requires that calls to these setter functions occur only during the Init state
(and the Pre-install state while handling a conforming ANSI C++ standards exception). The state con-
straints are discussed in unwind(5).
2 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: September 2010