ddpi_elf_list_variable operation

The ddpi_elf_list_variable operation lists all of the Ddpi_Variable objects associated with the given Ddpi_Elf object. Although the calling module must deallocate the list, the individual Ddpi_Variable objects in the list should never be deallocated, as these are the actual Ddpi_Variable objects associated with the Ddpi_Elf object.

The calling function should deallocate the returned list by using the following operation:ddpi_dealloc(info, *ret_variables, DDPI_DLA_LIST);

Prototype

int ddpi_elf_list_variable(
   Ddpi_Elf              elf,
   Ddpi_Variable**       ret_variables,
   Dwarf_Unsigned*       ret_count,
   Ddpi_Error*           error);

Parameters

elf
Input. This accepts the given Ddpi_Elf object.
ret_functions
Output. This returns the list of Ddpi_Variable objects in the Ddpi_Elf object as an array.
ret_count
Output. This returns the number of Ddpi_Variable objects in the array.
error
See The libddpi error parameter.

Return values

DW_DLV_OK
This value is returned upon successful completion of the operation.
DW_DLV_NO_ENTRY
There are no Ddpi_Function objects associated with the given Ddpi_Elf object.
DW_DLV_ERROR
This value is returned if:
  • elf is NULL or invalid.
  • The Ddpi_Info, Ddpi_Access, or Ddpi_Module object associated with the given Ddpi_Elf object is NULL or invalid
  • The ret_variables array is NULL.
  • The ret_count value is NULL.
  • An error occurs during memory allocation.