ddpi_module_extract_C_CPP_information operation

The ddpi_module_extract_C_CPP_information operation uses the given Ddpi_Module object to locate the module or program object, and extract all of the information needed to load a DWARF object for C/C++.

Description

The ddpi_module_extract_C_CPP_information operation requires that a Ddpi_EntryPt with the symbol name of CEESTART has been created to properly point to the entry point of the module.

This is a specific helper operation for C/C++ debugging. It does not support other languages. It will not attempt to process a non-C/C++ compile unit (CU).

ddpi_module_extract_C_CPP_information creates and lists the Ddpi_Elf objects associated with the given Ddpi_Module object. It then sets the ret_elf_list to an array of Ddpi_Elf descriptors, and sets the ret_elf_cnt of the items in that list to the number of entries in the array.

The caller must free the Ddpi_Elf list but not the individual Ddpi_Elf objects because these are not copies, but are the actual Ddpi_Elf objects stored in the Ddpi_Module.

The code to free ret_elf_list is:

rc = ddpi_dealloc( info, *ret_elf_list, DDPI_DLA_LIST);

Prototype

int  ddpi_module_extract_C_CPP_information (
       Ddpi_Module         module,          
       Ddpi_Elf**          ret_elf_list,    
       int*                ret_elf_cnt,     
       Ddpi_Error*         error);                

Parameters

module
Input. This accepts the Ddpi_Module object.
ret_elf_list
Output. This returns list of Ddpi_Elf objects.
ret_elf_cnt
Output. This returns count of the list entries.
error
See The libddpi error parameter.

Return values

DW_DLV_OK
Returned after the ELF list is successfully associated with an array of ELF descriptors.
DW_DLV_NO_ENTRY
Returned if no information could be extracted.
DW_DLV_ERROR
This value is returned if:
  • module is NULL or invalid.
  • The Ddpi_Info object associated with the module is either NULL or invalid.
  • ret_elf_list or ret_elf_cnt is NULL.
  • There are no entry points on module.
  • An entry point named CEESTART is not found.
  • The given entry point does not have a storage extent attached (class).
  • An error occurs finding the low address.