libdwarf: Reading gdbindex data

libdwarf

Loading...
Searching...
No Matches
Reading gdbindex data

Example accessing gdbindex section data.

Example accessing gdbindex section data.

*/
int examplew(Dwarf_Debug dbg,Dwarf_Error *error)
{
Dwarf_Gdbindex gindexptr = 0;
Dwarf_Unsigned version = 0;
Dwarf_Unsigned cu_list_offset = 0;
Dwarf_Unsigned types_cu_list_offset = 0;
Dwarf_Unsigned address_area_offset = 0;
Dwarf_Unsigned symbol_table_offset = 0;
Dwarf_Unsigned constant_pool_offset = 0;
Dwarf_Unsigned section_size = 0;
const char * section_name = 0;
int res = 0;
res = dwarf_gdbindex_header(dbg,&gindexptr,
&version,&cu_list_offset, &types_cu_list_offset,
&address_area_offset,&symbol_table_offset,
&constant_pool_offset, &section_size,
&section_name,error);
if (res != DW_DLV_OK) {
return res;
}
{
/* do something with the data
Dwarf_Error
struct Dwarf_Error_s * Dwarf_Error
Definition libdwarf.h:611
Dwarf_Debug
struct Dwarf_Debug_s * Dwarf_Debug
Definition libdwarf.h:617
Dwarf_Gdbindex
struct Dwarf_Gdbindex_s * Dwarf_Gdbindex
Definition libdwarf.h:706
Dwarf_Unsigned
unsigned long long Dwarf_Unsigned
Definition libdwarf.h:196
dwarf_gdbindex_header
DW_API int dwarf_gdbindex_header(Dwarf_Debug dw_dbg, Dwarf_Gdbindex *dw_gdbindexptr, Dwarf_Unsigned *dw_version, Dwarf_Unsigned *dw_cu_list_offset, Dwarf_Unsigned *dw_types_cu_list_offset, Dwarf_Unsigned *dw_address_area_offset, Dwarf_Unsigned *dw_symbol_table_offset, Dwarf_Unsigned *dw_constant_pool_offset, Dwarf_Unsigned *dw_section_size, const char **dw_section_name, Dwarf_Error *dw_error)
Open access to the .gdb_index section.