Example showing access to rnglists on an Attribute.
This is accessing DWARF5 .debug_rnglists. The section first appears in DWARF5.
*/
{
int res = 0;
theform,
attrvalue,
&rnglhead,
&entries_count,
&global_offset_of_rle_set,
error);
if (res != DW_DLV_OK) {
return res;
}
for (i = 0; i < entries_count; ++i) {
unsigned entrylen = 0;
unsigned code = 0;
i,&entrylen,&code,
&rawlowpc,&rawhighpc,
&debug_addr_unavailable,
&lowpc,&highpc,error);
if (res != DW_DLV_OK) {
return res;
}
if (code == DW_RLE_end_of_list) {
break;
}
if (code == DW_RLE_base_addressx ||
code == DW_RLE_base_address) {
continue;
}
if (debug_addr_unavailable) {
continue;
}
}
return DW_DLV_OK;
}
struct Dwarf_Rnglists_Head_s * Dwarf_Rnglists_Head
Definition: libdwarf.h:852
struct Dwarf_Error_s * Dwarf_Error
Definition: libdwarf.h:597
struct Dwarf_Attribute_s * Dwarf_Attribute
Definition: libdwarf.h:658
unsigned short Dwarf_Half
Definition: libdwarf.h:203
unsigned long long Dwarf_Unsigned
Definition: libdwarf.h:196
int Dwarf_Bool
Definition: libdwarf.h:202
int dwarf_rnglists_get_rle_head(Dwarf_Attribute dw_attr, Dwarf_Half dw_theform, Dwarf_Unsigned dw_index_or_offset_value, Dwarf_Rnglists_Head *dw_head_out, Dwarf_Unsigned *dw_count_of_entries_in_head, Dwarf_Unsigned *dw_global_offset_of_rle_set, Dwarf_Error *dw_error)
Get Access to DWARF5 rnglists.
void dwarf_dealloc_rnglists_head(Dwarf_Rnglists_Head dw_head)
Dealloc a Dwarf_Rnglists_Head.
int dwarf_get_rnglists_entry_fields_a(Dwarf_Rnglists_Head dw_head, Dwarf_Unsigned dw_entrynum, unsigned int *dw_entrylen, unsigned int *dw_rle_value_out, Dwarf_Unsigned *dw_raw1, Dwarf_Unsigned *dw_raw2, Dwarf_Bool *dw_debug_addr_unavailable, Dwarf_Unsigned *dw_cooked1, Dwarf_Unsigned *dw_cooked2, Dwarf_Error *dw_error)
Access rnglist entry details.