libdwarf
Functions
String Section .debug_str Details

Functions

int dwarf_get_str (Dwarf_Debug dw_dbg, Dwarf_Off dw_offset, char **dw_string, Dwarf_Signed *dw_strlen_of_string, Dwarf_Error *dw_error)
 Reading From a String Section. More...
 

Detailed Description

Shows just the section content in detail

Function Documentation

◆ dwarf_get_str()

int dwarf_get_str ( Dwarf_Debug  dw_dbg,
Dwarf_Off  dw_offset,
char **  dw_string,
Dwarf_Signed dw_strlen_of_string,
Dwarf_Error dw_error 
)

Reading The String Section

Parameters
dw_dbgThe Dwarf_Debug whose .debug_str section we want to access.
dw_offsetPass in a string offset. Start at 0, and for the next call pass in dw_offset plus dw_strlen_of_string plus 1.
dw_stringThe caller must pass in a valid pointer to a char *. On success returns a pointer to a string from offset dw_offset. Never dealloc or free this string.
dw_strlen_of_stringThe caller must pass in a valid pointer to a Dwarf_Signed.

On success returns the strlen() of the string.

Parameters
dw_errorOn error dw_error is set to point to the error details.
Returns
The usual value: DW_DLV_OK etc. If there is no such section it returns DW_DLV_NO_ENTRY. If the dw_offset is greater than the section size, or dw_string passed in is NULL or dw_strlen_of_string is NULL the function returns DW_DLV_ERROR.