Example using global symbol names.
For 0.4.2 and earlier this returned .debug_pubnames content. As of version 0.5.0 (October 2022) this returns .debug_pubnames (if it exists) and the relevant portion of .debug_names (if .debug_names exists) data.
*/
{
int res = 0;
if (res != DW_DLV_OK) {
return res;
}
for (i = 0; i < count; ++i) {
char *name = 0;
if (res != DW_DLV_OK) {
return res;
}
}
return DW_DLV_OK;
}
struct Dwarf_Debug_s * Dwarf_Debug
Definition: libdwarf.h:603
struct Dwarf_Global_s * Dwarf_Global
Definition: libdwarf.h:625
struct Dwarf_Error_s * Dwarf_Error
Definition: libdwarf.h:597
signed long long Dwarf_Signed
Definition: libdwarf.h:197
int dwarf_globname(Dwarf_Global dw_global, char **dw_returned_name, Dwarf_Error *dw_error)
Return the name of a global-like data item.
void dwarf_globals_dealloc(Dwarf_Debug dw_dbg, Dwarf_Global *dw_global_like, Dwarf_Signed dw_count)
Dealloc the Dwarf_Global data.
int dwarf_get_globals(Dwarf_Debug dw_dbg, Dwarf_Global **dw_globals, Dwarf_Signed *dw_number_of_globals, Dwarf_Error *dw_error)
Global name space operations, .debug_pubnames access.