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