dwarf_add_base_address_entry operation

The dwarf_add_base_address_entry operation adds a base address-selection entry.

Prototype

int dwarf_add_base_address_entry (    
  Dwarf_P_Debug         dbg,        
  Dwarf_Addr            baseaddr, 
  Dwarf_Off*            ret_sec_off,
  Dwarf_Error*          error);     

Parameters

dbg
Input. This accepts a libdwarf producer object.
baseaddr
Input. This accepts the starting address.
ret_sec_off
Output. This returns the section offset in the .debug_ranges section.
error
Input/output. This accepts or returns the Dwarf_Error object.

Return values

The dwarf_add_base_address_entry operation returns:
  • DW_DLV_OK if successful
  • DW_DLV_ERROR if dbg is NULL

dwarf_add_base_address_entry never returns DW_DLV_NO_ENTRY.