14 werrstr("nil pe passed to dwarfopen");
18 d
= mallocz(sizeof(Dwarf
), 1);
23 if(pe
->loadsection(pe
, ".debug_abbrev", &d
->abbrev
) < 0
24 || pe
->loadsection(pe
, ".debug_aranges", &d
->aranges
) < 0
25 || pe
->loadsection(pe
, ".debug_line", &d
->line
) < 0
26 || pe
->loadsection(pe
, ".debug_info", &d
->info
) < 0
27 || pe
->loadsection(pe
, ".debug_loc", &d
->loc
) < 0)
29 pe
->loadsection(pe
, ".debug_pubnames", &d
->pubnames
);
30 pe
->loadsection(pe
, ".debug_frame", &d
->frame
);
31 pe
->loadsection(pe
, ".debug_ranges", &d
->ranges
);
32 pe
->loadsection(pe
, ".debug_str", &d
->str
);
37 DPRINT("Failed to open dwarf\n");
39 free(d
->aranges
.data
);
42 free(d
->pubnames
.data
);
55 free(d
->aranges
.data
);
58 free(d
->pubnames
.data
);