libdwarf
Functions
String Section .debug_str Details

Shows just the section content in detail. More...

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 From a String Section.

Reading The String Section

Parameters
dw_dbgThe Dwarf_Debug whose .debug_str section we want to access.
dw_offsetPass in a a string offset. Start at 0, and for the next call pass in dw_offset plus dw_strlen_of_string plus 1.
dw_stringOn success returns a pointer to a string from offset dw_offset. Never dealloc or free this string.
dw_strlen_of_stringOn success returns the strlen() of the string.
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 or if dw_offset is >= the section size it returns DW_DLV_NO_ENTRY.