_UNW_currentContext(3X)_UNW_currentContext(3X)NAME_UNW_currentContext(), _UNW_clear(), _UNW_jmpbufContext(),
_UNW_setAR(), _UNW_setBR(), _UNW_setCFM(), _UNW_setFR(), _UNW_setGR(),
_UNW_setGR_NaT(), _UNW_setIP(), _UNW_setPR(), _UNW_setPreds(),
_UNW_step(), _UNW_FR_PhysicalNumber(), _UNW_GR_PhysicalNumber(),
_UNW_PR_PhysicalNumber() - manipulate values in unwind library data
structure
SYNOPSISDESCRIPTION
initializes the object to describe the processor state of the procedure
which is calling in other words, the processor state of "self."
initializes the object to describe the processor state captured in a by
a call to (see setjmp(3C)).
resets the object to the "just constructed" condition. All register
values in the are invalidated. The unwind library is placed in the
Init state meaning the client can now use the _UNW_set routines to ini‐
tialize values in the The Init state is discussed further in unwind(5).
initializes the value of numbered general register num to value in the
pointed to by parameter p. The NAT bit for the register is set to
initializes the value of a numbered general register num to value in
the pointed to by parameter p. The NAT bit for the register is set to
initializes the value of a numbered floating point register, num, in
the pointed to by parameter p, to the value image represented in param‐
eters first_container and second_container. These two containers rep‐
resent the two consecutive double words of the Floating point register
Spill/Fill memory format. See "Section 5.3: Floating Point Instruc‐
tions".
initializes the value of numbered branch register num to value in the
pointed to by parameter p.
initializes the value of enumerated application register num to value
in the pointed to by parameter p. The enumeration type is used for
accessing application registers.
initializes the value of a numbered predicate register num, in the
pointed to by parameter p, to value, which is one of or
initializes the value of all predicate registers in the pointed to by
parameter p to a representation passed in value. value contains the
contents of each predicate register in the bit corresponding corre‐
sponding to the predicate register number; for instance, bit 63 con‐
tains the contents (1 or 0) for predicate register 63.
initializes the value of the instruction pointer to value in the
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 See "Section 1: Memory Model".
initializes the value of the (CFM) to value in the pointed to by param‐
eter p. Refer to "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
visible value. It is used by the unwind library while initializing an
for unwinding to provide the initial 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 purpose is to fill in an
structure which describes its own state. That procedure (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 interrup‐
tion event. See "Chapter 5: IA-64 Interruptions".
and for the pointed to by parameter p return the physical register num‐
ber 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
The stack unwind library requires that calls to these setter functions
occur only during the state (and the state while handling a conforming
ANSI C++ standards exception). The state constraints are discussed in
unwind(5).
The transition into the Init state happens when or is called. In the
Init state, calls are allowed to initialize values in the of General
Registers 1-31, scratch and preserved Floating Point Registers, scratch
and preserved Predicate Registers, Branch Registers 0-7, IP, CFM, and
Application Registers in the set RSC, BSP, BSPSTORE, RNAT, CCV, UNAT,
FPSR, ITC, PFS, LC. Writing to a particular register validates that
value in the A call to invalidates the general register values in the
range GR32..GR127 and validates the current frame marker (CFM) value.
Once the CFM value is valid writes to General Registers in the range,
GR32 through GR32 + CFM.sof are allowed (for the purpose of initializ‐
ing RSE stacked general registers in the current procedure's RSE
frame).
A specific set of registers listed in the unwind(5) section must be
validated in order for a call to to be successful.
Any initialization of register values not specifically listed in the
previous paragraph is not allowed. For instance initialization of the
constant registers (GR0, FR0, FR1, PR0) are not allowed. Violating
this rule results in the alert code set to and the function returning
Attempts to initialize an object which is in a state where initializa‐
tion of values is not allowed causes no change to the value in It
results in a return alert code of See also unwind(5).
The unwind library register value initializer functions refer to regis‐
ters by their physical numbers as opposed to the mapped (logical) num‐
bers associated with rotations indicated in CFM.sor, CFM.rrb.gr,
CFM.rrb.pr, CFM.rrb.fr. The stack unwind library defines the physical
number to be the register number the value would lie in should the
appropriate CFM.rrb field have value 0.
The mapping functions and return the physical register number to pass
to the initializer functions to access a given logical register. Pass‐
ing a mapping function a logical number which is outside of the range
of mapped logical numbers returns 0 and sets the alert condition. For
example, calling while CFM.sor is 0 sets the alert condition. The con‐
tents of the object's CFM should be initialized prior to using the map‐
ping functions.
modifies the pointed to by parameter p to represent the processor
state.
RETURN VALUE
returns when is in a state where initialization of values is not
allowed. States in which initialization is allowed are Init and
Pre_Install. See in the manpage unwind(5).
returns on an attempt to initialize a register for which initialization
is forbidden. See the subsection above. Otherwise returns on success‐
ful completion.
returns on successful completion. Otherwise returns when is not in one
of the following states: Init, User_Interrupted_Frame, User_Send‐
sig_Frame, Kernel_Bottom_Frame, Frame. See unwind(5).
and each return a register number. They return 0 (along with the side
effect of setting the alert code to if passed a logical number which is
outside of the range of mapped logical numbers for that register class.
produces the following return codes:
Indicates describes a frame beyond which the stack unwind
library can no longer step. Any HP_UX kernel inter‐
ruption frame other than the one associated with which
supports user signal handling (see signal(5)) results
in this return value.
Indicates describes a frame beyond which the stack unwind
library can no longer step. This return code is pro‐
duced when is called for any describing a procedure
whose frame is marked with the bottom of stack conven‐
tion — a saved return link of 0 (see "Chapter 11.1
Unwinding the stack").
All's well.
Some generic problem occurred during step.
This return code indicates the is in state Bad. See
unwind(5) section
Some logic problem occurred during step.
Contact HP support.
The instruction pointer value in
is marked invalid. The probable cause is a failure to
initialize it. This return code indicates the is in
state Bad. See the section in unwind(5).
The stack pointer value in
is marked invalid. The probable cause is a failure to
initialize it. This return code indicates the is in
state Bad. See the section in unwind(5).
A general register value which was marked invalid
was encountered in during the step process. The prob‐
able cause is a failure to initialize it. This return
code indicates the is in state Bad. See the section
in unwind(5).
The AR.PRS value in
is marked invalid. The probable cause is a failure to
initialize it. This return code indicates the is in
state Bad. See the section in unwind(5).
The AR.RSC value in
is marked invalid. The probable cause is a failure to
initialize it. This return code indicates the is in
state Bad. See the section in unwind(5).
The AR.BSP value in
is marked invalid. The probable cause is a failure to
initialize it. This return code indicates the is in
state Bad. See the section in unwind(5).
The AR.BSPSTORE value in
is marked invalid. The probable cause is a failure to
initialize it. This return code indicates the is in
state Bad. See the section in unwind(5).
The AR.CFM value in
is marked invalid. The probable cause is a failure to
initialize it. This return code indicates the is in
state Bad. See the section in unwind(5).
A branch register value which was marked invalid
was encountered in during the step process. The prob‐
able cause is a failure to initialize it. This return
code indicates the is in state Bad. See the section
in unwind(5).
The value ar.BSP was not aligned. This return code indi‐
cates the is in state Bad. See the section in
unwind(5).
The AR.RNAT value in
is marked invalid. The probable cause is a failure to
initialize it. This return code indicates the is in
state Bad. See the section in unwind(5).
The stack unwind library
could not find an unwind descriptor for a procedure
which the stack unwind library can prove is not a leaf
procedure. All non-leaf procedures are required to
have unwind descriptors. Some but not all possible
causes for this include
· code that does not conform to the coding con‐
ventions specified in "Chapter 11.3 Coding con‐
ventions for reliable unwinding".
· failure of a callback function (see unwind(5))
to identify the location of the unwind header
or text segment base
· corrupted system memory
· initialization of the with incorrect values
The unwind descriptor for the frame was mis-formed.
This return code indicates the is in state Bad. See
the section in unwind(5).
The register stack engine was not flushed.
See unwind(5). This return code indicates the is in
state Bad. See the section in unwind(5).
has the following return codes:
All's well.
A generic problem occurred during a call to
The unwind descriptor for the frame was mis-formed.
This return code indicates the is in state Bad. See
the section in unwind(5).
The stack unwind library cannot allocate enough memory to
perform the function requested. is in state Bad. See
unwind(5).
Some logic problem occurred during step.
Contact HP support.
ERRORS
fails gracefully (that is, returns an appropriate error) if there is
not enough memory to perform the initialization or a library interac‐
tion problem (for example, calls to the service manager or prevents
from performing the initialization.
EXAMPLES
Initialize the value of General Register 5 to 400:
AUTHOR
and were developed by HP.
SEE ALSOU_STACK_TRACE(3X), _UNW_createContextForSelf(3X), _UNW_getGR(3X),
unwind(5).
Integrity Systems Only _UNW_currentContext(3X)