libdwarf: String Section .debug_str Details

libdwarf

Loading...
Searching...
No Matches
Functions
String Section .debug_str Details

## Functions
DW_API 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.

## Detailed Description

Shows just the section content in detail

## Function Documentation

## ◆ dwarf_get_str()

DW_API 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_dbg | The Dwarf_Debug whose .debug_str section we want to access.
  dw_offset | Pass in a string offset. Start at 0, and for the next call pass in dw_offset plus dw_strlen_of_string plus 1.
  dw_string | The 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_string | The caller must pass in a valid pointer to a Dwarf_Signed.

On success returns the strlen() of the string.

Parameters

  dw_error | On 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.