Example reading .debug_aranges.
An example accessing the .debug_aranges section. Looking all the aranges entries. This example is not searching for anything.
*/
{
for ( ; k < count; ++k) {
arange[k] = 0;
}
}
{
int res = 0;
if (res == DW_DLV_OK) {
for (i = 0; i < count; ++i) {
&segment,&segment_entry_size,
&start, &length,
&cu_die_offset,error);
if (res != DW_DLV_OK) {
cleanupbadarange(dbg,arange,i,count);
return res;
}
arange[i] = 0;
}
}
return res;
}
struct Dwarf_Debug_s * Dwarf_Debug
Definition: libdwarf.h:603
struct Dwarf_Error_s * Dwarf_Error
Definition: libdwarf.h:597
struct Dwarf_Arange_s * Dwarf_Arange
Definition: libdwarf.h:682
int dwarf_get_arange_info_b(Dwarf_Arange dw_arange, Dwarf_Unsigned *dw_segment, Dwarf_Unsigned *dw_segment_entry_size, Dwarf_Addr *dw_start, Dwarf_Unsigned *dw_length, Dwarf_Off *dw_cu_die_offset, Dwarf_Error *dw_error)
Get the data in an arange entry.
int dwarf_get_aranges(Dwarf_Debug dw_dbg, Dwarf_Arange **dw_aranges, Dwarf_Signed *dw_arange_count, Dwarf_Error *dw_error)
Get access to CUs given code addresses.
signed long long Dwarf_Signed
Definition: libdwarf.h:197
unsigned long long Dwarf_Unsigned
Definition: libdwarf.h:196
unsigned long long Dwarf_Off
Definition: libdwarf.h:198
unsigned long long Dwarf_Addr
Definition: libdwarf.h:199
void dwarf_dealloc(Dwarf_Debug dw_dbg, void *dw_space, Dwarf_Unsigned dw_type)
The generic dealloc (free) function. It requires you know the correct DW_DLA value to pass in,...