The ddpi_elf_get_primary_sourcefile operation
returns the primary Ddpi_Sourcefile object associated with
the given Ddpi_Elf object. The Ddpi_Sourcefile object
should never be deallocated; this is the actual primary Ddpi_Sourcefile object
associated with the Ddpi_Elf object.
Prototype
int ddpi_elf_get_primary_sourcefile(
Ddpi_Elf elf,
Ddpi_Sourcefile* ret_sourcefile,
Ddpi_Error* error);
Parameters
- elf
- Input. This accepts the given Ddpi_Elf object.
- ret_sourcefile
- Output. This returns the primary Ddpi_Sourcefile object
for the Ddpi_Elf object.
- 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
- The primary Ddpi_Sourcefile object is not available to
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_sourcefile array is NULL.
- An error occurs during memory allocation.