libdwarf: Reading an aranges section

libdwarf

Loading...
Searching...
No Matches
Reading an aranges section

Example reading .debug_aranges.

Example reading .debug_aranges.

An example accessing the .debug_aranges section. Looking all the aranges entries. This example is not searching for anything.

Parameters

  dbg | The Dwarf_Debug of interest.
  dw_error | On error dw_error is set to point to the error details.

Returns
  DW_DLV_OK etc.

*/
static void cleanupbadarange(Dwarf_Debug dbg,
Dwarf_Arange *arange, Dwarf_Signed i, Dwarf_Signed count)
{
Dwarf_Signed k = i;
for ( ; k < count; ++k) {
dwarf_dealloc(dbg,arange[k] , DW_DLA_ARANGE);
arange[k] = 0;
}
}
int exampleu(Dwarf_Debug dbg,Dwarf_Error <em>error)
{
/</em> It is a historical accident that the count is signed.
No negative count is possible.
Dwarf_Arange
struct Dwarf_Arange_s * Dwarf_Arange
Definition libdwarf.h:701
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_Signed
signed long long Dwarf_Signed
Definition libdwarf.h:197
dwarf_dealloc
DW_API void dwarf_dealloc(Dwarf_Debug dw_dbg, void *dw_space, Dwarf_Unsigned dw_type)
The generic dealloc (free) function. It requires you know the correct DW_DLA value to pass in,...