libdwarf
Reading gdbindex addressarea

Example accessing gdbindex addressarea data.

*/
int examplewgdbindex(Dwarf_Gdbindex gdbindex,
Dwarf_Error *error)
{
Dwarf_Unsigned list_len = 0;
int res = 0;
res = dwarf_gdbindex_addressarea(gdbindex, &list_len,error);
if (res != DW_DLV_OK) {
/* Something wrong, ignore the addressarea */
return res;
}
/* Iterate through the address area. */
for (i = 0; i < list_len; i++) {
Dwarf_Unsigned lowpc = 0;
Dwarf_Unsigned highpc = 0;
Dwarf_Unsigned cu_index = 0;
&lowpc,&highpc,
&cu_index,
error);
if (res != DW_DLV_OK) {
/* Something wrong, ignore the addressarea */
return res;
}
/* We have a valid address area entry, do something
with it. */
}
return DW_DLV_OK;
}
struct Dwarf_Gdbindex_s * Dwarf_Gdbindex
Definition: libdwarf.h:687
struct Dwarf_Error_s * Dwarf_Error
Definition: libdwarf.h:597
unsigned long long Dwarf_Unsigned
Definition: libdwarf.h:196
int dwarf_gdbindex_addressarea(Dwarf_Gdbindex dw_gdbindexptr, Dwarf_Unsigned *dw_addressarea_list_length, Dwarf_Error *dw_error)
Get access to gdbindex address area.
int dwarf_gdbindex_addressarea_entry(Dwarf_Gdbindex dw_gdbindexptr, Dwarf_Unsigned dw_entryindex, Dwarf_Unsigned *dw_low_address, Dwarf_Unsigned *dw_high_address, Dwarf_Unsigned *dw_cu_index, Dwarf_Error *dw_error)
Get an address area value.