The ddpi_elf_get_ppa_addrs operation queries the
PPA addresses for a given Ddpi_Elf object.
Description
Only C/C++ compilation
units produce PPA control blocks. If the Ddpi_Elf object contains a C/C++
compilation unit, the operation will return one PPA2 address. If the compilation
unit is compiled with ISD debug information (in other words, compiled with
the TEST compiler option), then the operation will also return the PPA1 and
the corresponding function addresses.
Prototype
int ddpi_elf_get_ppa_addrs(
Ddpi_Elf elf,
Dwarf_Addr* ret_ppa2_addr,
Dwarf_Addr** ret_ppa1_addrs,
Dwarf_Addr** ret_func_addrs,
int* ret_ppa1_count,
Ddpi_Error* error);
Parameters
- elf
- Input. This accepts a Ddpi_Elf object.
- ret_ppa2_addr
- Output. This returns a PPA2 address of the compilation unit.
0 means that the PPA2 block does not exist.
- ret_ppa1_addrs
- Output. This returns a pointer to a PPA1 address list. This value cannot
be NULL.
- ret_func_addrs
- Output. This returns a pointer to a function-address list. This value
cannot be NULL.
- ret_ppa1_count
- Output. This returns the number of PPA1 addresses in the list, which is
the same number as in the function-address list. This value cannot
be NULL. If the returned value is 0, the PPA1 blocks do not exist or the compilation
unit is not compiled with the TEST compiler option.
- error
- See The libddpi error parameter.
Return values
- DW_DLV_OK
- Returned upon successful return of the PPA1 address list.
Note: This
does not indicate the presence of PPA2/PPA1 blocks. You must check the individual
return value to test for the presence of PPA control blocks.
- DW_DLV_NO_ENTRY
- Never returned.
- DW_DLV_ERROR
- This value is returned if:
- elf is NULL or corrupted.
- The Ddpi_Access or Ddpi_Info object
associated with elf is NULL.
- ret_elf_filename is NULL or corrupted.
- A returned pointer is NULL