libdwarf
Functions
Str_Offsets section details

Shows just the section content in detail. Most library users will never call these, as references to this is handled by the code accessing some Dwarf_Attribute. Reading The Str_Offsets . More...

Functions

int dwarf_open_str_offsets_table_access (Dwarf_Debug dw_dbg, Dwarf_Str_Offsets_Table *dw_table_data, Dwarf_Error *dw_error)
 Allocates a access to a .debug_str_ofrfsets table. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

Shows just the section content in detail. Most library users will never call these, as references to this is handled by the code accessing some Dwarf_Attribute. Reading The Str_Offsets .

Function Documentation

◆ dwarf_open_str_offsets_table_access()

int dwarf_open_str_offsets_table_access ( Dwarf_Debug  dw_dbg,
Dwarf_Str_Offsets_Table dw_table_data,
Dwarf_Error dw_error 
)

Allocates a access to a .debug_str_ofrfsets table.

See also
Example of string offsets access
Parameters
dw_dbgPass in the Dwarf_Debug of interest.
dw_table_dataOn success returns a pointer to an opaque structure for use in further calls.
dw_errorOn error dw_error is set to point to the error details.
Returns
DW_DLV_OK etc. If there is no .debug_str_offsets section it returns DW_DLV_NO_ENTRY

◆ dwarf_close_str_offsets_table_access()

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.

See also
Example of string offsets access
Parameters
dw_table_data
dw_errorOn error dw_error is set to point to the error details.
Returns
DW_DLV_OK etc. If there is no .debug_str_offsets section it returns DW_DLV_NO_ENTRY If it returns DW_DLV_ERROR there is nothing you can do except report the error and, optionally, call dwarf_dealloc_error to dealloc the error content (and then set the dw_error to NULL as after the dealloc the pointer is stale)..

◆ dwarf_next_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.

See also
Example of string offsets access

Access to the tables starts at offset zero. The library progresses through the next table automatically, keeping track internally to know where it is.

Parameters
dw_table_dataPass in an open Dwarf_Str_Offsets_Table.
dw_unit_lengthOn success returns a table unit_length field
dw_unit_length_offsetOn success returns the section offset of the unit_length field.
dw_table_start_offsetOn success returns the section offset of the array of table entries.
dw_entry_sizeOn success returns the entry size (4 or 8)
dw_versionOn success returns the value in the version field 5.
dw_paddingOn success returns the zero value in the padding field.
dw_table_value_countOn success returns the number of table entries, each of size dw_entry_size, in the table.
dw_errorOn error dw_error is set to point to the error details.
Returns
DW_DLV_OK Returns DW_DLV_NO_ENTRY if there are no more entries.

◆ dwarf_str_offsets_value_by_index()

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.

See also
Example of string offsets access
Parameters
dw_table_dataPass in the open table pointer.
dw_index_to_entryPass in the entry number, 0 through dw_table_value_count-1 for the active table
dw_entry_valueOn success returns the value in that table entry, an offset into a string table.
dw_errorOn error dw_error is set to point to the error details.
Returns
DW_DLV_OK Returns DW_DLV_ERROR if dw_index_to_entry is out of the correct range.

◆ dwarf_str_offsets_statistics()

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.

Reports the number of tables seen so far. Not very interesting.

Parameters
dw_table_dataPass in the open table pointer.
dw_wasted_byte_countAlways returns 0 at present.
dw_table_countOn success returns the total number of tables seen so far in the section.
dw_errorOn error dw_error is set to point to the error details.
Returns
DW_DLV_OK etc.