Example accessing the string offsets section.
*/
{
int res = 0;
if (res == DW_DLV_NO_ENTRY) {
return res;
}
if (res == DW_DLV_ERROR) {
return res;
}
for (;;) {
&unit_length, &unit_length_offset,
&table_start_offset,
&entry_size,&version,&padding,
&table_value_count,error);
if (res == DW_DLV_NO_ENTRY) {
break;
}
if (res == DW_DLV_ERROR) {
return res;
}
for (i=0; i < table_value_count; ++i) {
&table_entry_value,error);
if (res != DW_DLV_OK) {
return res;
}
}
}
&table_count,error);
if (res != DW_DLV_OK) {
return res;
}
sot = 0;
return res;
}
struct Dwarf_Debug_s * Dwarf_Debug
Definition: libdwarf.h:603
struct Dwarf_Str_Offsets_Table_s * Dwarf_Str_Offsets_Table
Definition: libdwarf.h:455
struct Dwarf_Error_s * Dwarf_Error
Definition: libdwarf.h:597
unsigned short Dwarf_Half
Definition: libdwarf.h:203
unsigned long long Dwarf_Unsigned
Definition: libdwarf.h:196
void dwarf_dealloc_error(Dwarf_Debug dw_dbg, Dwarf_Error dw_error)
Free (dealloc) an Dwarf_Error something created.
int dwarf_str_offsets_statistics(Dwarf_Str_Offsets_Table dw_table_data, Dwarf_Unsigned *dw_wasted_byte_count, Dwarf_Unsigned *dw_table_count, Dwarf_Error *dw_error)
Reports final wasted-bytes count.
int dwarf_open_str_offsets_table_access(Dwarf_Debug dw_dbg, Dwarf_Str_Offsets_Table *dw_table_data, Dwarf_Error *dw_error)
Creates access to a .debug_str_offsets table.
int dwarf_next_str_offsets_table(Dwarf_Str_Offsets_Table dw_table_data, Dwarf_Unsigned *dw_unit_length, Dwarf_Unsigned *dw_unit_length_offset, Dwarf_Unsigned *dw_table_start_offset, Dwarf_Half *dw_entry_size, Dwarf_Half *dw_version, Dwarf_Half *dw_padding, Dwarf_Unsigned *dw_table_value_count, Dwarf_Error *dw_error)
Iterate through the offsets tables.
int dwarf_close_str_offsets_table_access(Dwarf_Str_Offsets_Table dw_table_data, Dwarf_Error *dw_error)
Close str_offsets access, free table_data.
int dwarf_str_offsets_value_by_index(Dwarf_Str_Offsets_Table dw_table_data, Dwarf_Unsigned dw_index_to_entry, Dwarf_Unsigned *dw_entry_value, Dwarf_Error *dw_error)
Access to an individual str offsets table entry.