ddpi_stackstate_identify operation

The ddpi_stackstate_identify operation attempts to identify and dissect the initial stack frame.

Description

The initial stack frame is associated with the target machine state contained in the given Ddpi_MachineState object. ddpi_stackstate_identify uses the operations associated with the Ddpi_MachineState object to examine the register and storage contents.

The outer ddpi_stackstate_identify operation will iterate through the Ddpi_StackState_Fnobject, which is provided by the application. When a stack frame is successfully identified, the Ddpi_StackState object is initialized, and set up with all relevant stack frame-information.

Prototype

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

Parameters

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.
workarea
Input. This accepts the 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 the given state-stack object has been successfully identified and analyzed.
DW_DLV_NO_ENTRY
Returned if the stack frame is not in a format that is recognized by this exit.
DW_DLV_ERROR
This value is returned if:
  • stackstate is NULL.
  • The Ddpi_Info object associated with stackstate is NULL
  • stackstate_fn is NULL
  • machinestate is NULL