The ddpi_elf_list_function operation lists all
of the Ddpi_Function objects associated with the given Ddpi_Elf object.
Although the calling module must deallocate the list, the individual Ddpi_Function objects
in the list should never be deallocated, as these are the actual Ddpi_Function objects
from the Ddpi_Elf object.
The calling function should deallocate the returned list by using
the following operation:ddpi_dealloc(info, *ret_functions, DDPI_DLA_LIST);
Prototype
int ddpi_elf_list_function(
Ddpi_Elf elf,
Ddpi_Function** ret_functions,
Dwarf_Unsigned* ret_count,
Ddpi_Error* error);
Parameters
- elf
- Input. This accepts the Ddpi_Elf object.
- ret_functions
- Output. This returns the list of Ddpi_Function objects
in the Ddpi_Elf object as an array.
- ret_count
- Output. This returns the number of Ddpi_Function 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_functions array is NULL.
- The ret_count value is NULL.
- An error occurs during memory allocation.