ddpi_stackstate_parent operation

The ddpi_stackstate_parent operation attempts to identify and dissect the parent stack frame associated with the target machine state.

Description

This process requires the requires the target machine state and the current stack frame. The target machine state is specified by the given Ddpi_MachineState object. The current stack frame is specified by the given Ddpi_StackState object.

ddpi_stackstate_parent uses the APIs associated with the Ddpi_MachineState object to examine the register and storage contents.

The outer ddpi_stackstate_parent operation will iterate through the Ddpi_StackState_Fn object, which is provided by the application. When a stack frame is successfully identified, the parent Ddpi_MachineState object is initialized and all relevant machine state values are set. If any value is unknown or questionable, the valid flag for that value must be FALSE.

Note: The parent Ddpi_MachineState object may also be cloned from the current Ddpi_MachineState object, as appropriate.

The parent Ddpi_StackState object is then initialized, and set up with all relevant parent stack frame information.

Prototype

int ddpi_stackstate_parent(
  Ddpi_StackState_Fn    stackstate_fn,
  Ddpi_MachineState     machinestate,
  Ddpi_StackState       stackstate,
  Ddpi_MachineState     parent_machinestate,
  Ddpi_StackState       parent_stackstate,
  Dwarf_Ptr             workarea,
  unsigned int          workarea_len,
  Ddpi_Error*           error);

Parameters

Ddpi_StackState_Fn
Input. This accepts the Ddpi_StackState_Fn object.
machinestate
Input. This accepts the Ddpi_MachineState object.
stackstate
Input. This accepts the Ddpi_StackState object.
parent_machinestate
Output. This returns the parent Ddpi_MachineState object.
parent_stackstate
Output. This returns the parent Ddpi_StackState object.
workarea
Input. This accepts a pointer to the work area buffer.
workarea_len
Input. This accepts the work area length.
error
See The libddpi error parameter.

Return values

DW_DLV_OK
Returned when a pointer to the parent of the given state-stack object has been successfully retrieved.
DW_DLV_NO_ENTRY
Returned if the parent stack frame is not in a format that is recognized by this exit.
DW_DLV_ERROR
This value is returned if:
  • stackstate is NULL.
  • parent_stackstate is NULL.
  • The Ddpi_Info object associated with stackstate is NULL.
  • stackstate_fn is NULL.
  • machinestate is NULL.
  • parent_machinestate is NULL.