libdwarf
Functions
Fast Access-Split Dwarf (Debug Fission)

Functions

int dwarf_get_xu_index_header (Dwarf_Debug dw_dbg, const char *dw_section_type, Dwarf_Xu_Index_Header *dw_xuhdr, Dwarf_Unsigned *dw_version_number, Dwarf_Unsigned *dw_section_count, Dwarf_Unsigned *dw_units_count, Dwarf_Unsigned *dw_hash_slots_count, const char **dw_sect_name, Dwarf_Error *dw_error)
 Access a .debug_cu_index or dw_tu_index section. More...
 
void dwarf_dealloc_xu_header (Dwarf_Xu_Index_Header dw_xuhdr)
 Dealloc (free) memory associated with dw_xuhdr. More...
 
int dwarf_get_xu_index_section_type (Dwarf_Xu_Index_Header dw_xuhdr, const char **dw_typename, const char **dw_sectionname, Dwarf_Error *dw_error)
 Return basic information about a Dwarf_Xu_Index_Header. More...
 
int dwarf_get_xu_hash_entry (Dwarf_Xu_Index_Header dw_xuhdr, Dwarf_Unsigned dw_index, Dwarf_Sig8 *dw_hash_value, Dwarf_Unsigned *dw_index_to_sections, Dwarf_Error *dw_error)
 Get a Hash Entry. More...
 
int dwarf_get_xu_section_names (Dwarf_Xu_Index_Header dw_xuhdr, Dwarf_Unsigned dw_column_index, Dwarf_Unsigned *dw_SECT_number, const char **dw_SECT_name, Dwarf_Error *dw_error)
 get DW_SECT value for a column. More...
 
int dwarf_get_xu_section_offset (Dwarf_Xu_Index_Header dw_xuhdr, Dwarf_Unsigned dw_row_index, Dwarf_Unsigned dw_column_index, Dwarf_Unsigned *dw_sec_offset, Dwarf_Unsigned *dw_sec_size, Dwarf_Error *dw_error)
 Get row data (section data) for a row and column. More...
 
int dwarf_get_debugfission_for_die (Dwarf_Die dw_die, Dwarf_Debug_Fission_Per_CU *dw_percu_out, Dwarf_Error *dw_error)
 Get debugfission data for a Dwarf_Die. More...
 
int dwarf_get_debugfission_for_key (Dwarf_Debug dw_dbg, Dwarf_Sig8 *dw_hash_sig, const char *dw_cu_type, Dwarf_Debug_Fission_Per_CU *dw_percu_out, Dwarf_Error *dw_error)
 Given a hash signature find per-cu Fission data. More...
 

Detailed Description

Function Documentation

◆ dwarf_get_xu_index_header()

int dwarf_get_xu_index_header ( Dwarf_Debug  dw_dbg,
const char *  dw_section_type,
Dwarf_Xu_Index_Header dw_xuhdr,
Dwarf_Unsigned dw_version_number,
Dwarf_Unsigned dw_section_count,
Dwarf_Unsigned dw_units_count,
Dwarf_Unsigned dw_hash_slots_count,
const char **  dw_sect_name,
Dwarf_Error dw_error 
)

Access a .debug_cu_index or dw_tu_index section.

These sections are in a DWARF5 package file, a file normally named with the .dwo or .dwp extension.. See DWARF5 section 7.3.5.3 Format of the CU and TU Index Sections.

Parameters
dw_dbgPass in the Dwarf_Debug of interest
dw_section_typePass in a pointer to either "cu" or "tu".
dw_xuhdrOn success, returns a pointer usable in further calls.
dw_version_numberOn success returns five.
dw_section_countOn success returns the number of entries in the table of section counts. Referred to as N.
dw_units_countOn success returns the number of compilation units or type units in the index. Referred to as U.
dw_hash_slots_countOn success returns the number of slots in the hash table. Referred to as S.
dw_sect_nameOn success returns a pointer to the name of the section. Do not free/dealloc the returned pointer.
dw_errorThe usual pointer to return error details.
Returns
Returns DW_DLV_OK etc. Returns DW_DLV_NO_ENTRY if the section requested is not present.

◆ dwarf_dealloc_xu_header()

void dwarf_dealloc_xu_header ( Dwarf_Xu_Index_Header  dw_xuhdr)

Dealloc (free) memory associated with dw_xuhdr.

Should be named dwarf_dealloc_xuhdr instead.

Parameters
dw_xuhdrDealloc (free) all associated memory. The caller should zero the passed in value on return as it is then a stale value.

◆ dwarf_get_xu_index_section_type()

int dwarf_get_xu_index_section_type ( Dwarf_Xu_Index_Header  dw_xuhdr,
const char **  dw_typename,
const char **  dw_sectionname,
Dwarf_Error dw_error 
)

Return basic information about a Dwarf_Xu_Index_Header.

Parameters
dw_xuhdrPass in an open header pointer.
dw_typenameOn success returns a pointer to the immutable string "tu" or "cu". Do not free.
dw_sectionnameOn success returns a pointer to the section name in the object file. Do not free.
dw_errorThe usual pointer to return error details.
Returns
Returns DW_DLV_OK etc.

◆ dwarf_get_xu_hash_entry()

int dwarf_get_xu_hash_entry ( Dwarf_Xu_Index_Header  dw_xuhdr,
Dwarf_Unsigned  dw_index,
Dwarf_Sig8 dw_hash_value,
Dwarf_Unsigned dw_index_to_sections,
Dwarf_Error dw_error 
)

Get a Hash Entry.

See also
examplez/x
Parameters
dw_xuhdrPass in an open header pointer.
dw_indexPass in the index of the entry you wish. Valid index values are 0 through S-1.
dw_hash_valuePass in a pointer to a Dwarf_Sig8. On success the hash struct is filled in with the 8 byte hash value.
dw_index_to_sectionsOn success returns the offset/size table index for this hash entry.
dw_errorThe usual pointer to return error details.
Returns
Returns DW_DLV_OK etc.

◆ dwarf_get_xu_section_names()

int dwarf_get_xu_section_names ( Dwarf_Xu_Index_Header  dw_xuhdr,
Dwarf_Unsigned  dw_column_index,
Dwarf_Unsigned dw_SECT_number,
const char **  dw_SECT_name,
Dwarf_Error dw_error 
)

get DW_SECT value for a column.

See also
Example geting Debug Fission data
Parameters
dw_xuhdrPass in an open header pointer.
dw_column_indexThe section names are in row zero of the table so we do not mention the row number at all. Pass in the column of the entry you wish. Valid dw_column_index values are 0 through N-1.
dw_SECT_numberOn success returns DW_SECT_INFO or other section id as appears in dw_column_index.
dw_SECT_nameOn success returns a pointer to the string for with the section name.
dw_errorThe usual pointer to return error details.
Returns
Returns DW_DLV_OK etc.

◆ dwarf_get_xu_section_offset()

int dwarf_get_xu_section_offset ( Dwarf_Xu_Index_Header  dw_xuhdr,
Dwarf_Unsigned  dw_row_index,
Dwarf_Unsigned  dw_column_index,
Dwarf_Unsigned dw_sec_offset,
Dwarf_Unsigned dw_sec_size,
Dwarf_Error dw_error 
)

Get row data (section data) for a row and column.

Parameters
dw_xuhdrPass in an open header pointer.
dw_row_indexPass in a row number , 1 through U
dw_column_indexPass in a column number , 0 through N-1
dw_sec_offsetOn success returns the section offset of the section whose name dwarf_get_xu_section_names returns.
dw_sec_sizeOn success returns the section size of the section whose name dwarf_get_xu_section_names returns.
dw_errorThe usual pointer to return error details.
Returns
Returns DW_DLV_OK etc.

◆ dwarf_get_debugfission_for_die()

int dwarf_get_debugfission_for_die ( Dwarf_Die  dw_die,
Dwarf_Debug_Fission_Per_CU dw_percu_out,
Dwarf_Error dw_error 
)

Get debugfission data for a Dwarf_Die.

For any Dwarf_Die in a compilation unit, return the debug fission table data through dw_percu_out. Usually applications will pass in the CU die. Calling code should zero all of the struct Dwarf_Debug_Fission_Per_CU_s before calling this. If there is no debugfission data this returns DW_DLV_NO_ENTRY (only .dwp objects have debugfission data)

Parameters
dw_diePass in a Dwarf_Die pointer, Usually pass in a CU DIE pointer.
dw_percu_outPass in a pointer to a zeroed structure. On success the function fills in the structure.
dw_errorThe usual pointer to return error details.
Returns
Returns DW_DLV_OK etc.

◆ dwarf_get_debugfission_for_key()

int dwarf_get_debugfission_for_key ( Dwarf_Debug  dw_dbg,
Dwarf_Sig8 dw_hash_sig,
const char *  dw_cu_type,
Dwarf_Debug_Fission_Per_CU dw_percu_out,
Dwarf_Error dw_error 
)

Given a hash signature find per-cu Fission data.

Parameters
dw_dbgPass in the Dwarf_Debug of interest.
dw_hash_sigPass in a pointer to a Dwarf_Sig8 containing a hash value of interest.
dw_cu_typePass in the type, a string. Either "cu" or "tu".
dw_percu_outPass in a pointer to a zeroed structure. On success the function fills in the structure.
dw_errorThe usual pointer to return error details.
Returns
Returns DW_DLV_OK etc.