Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.

This commit is contained in:
Colin Finck 2017-10-03 07:45:34 +00:00
parent b94e2d8ca0
commit c2c66aff7d
24198 changed files with 0 additions and 37285 deletions

View file

@ -0,0 +1,65 @@
#include <precomp.h>
#define NDEBUG
#include <debug.h>
/* Adapted for PE */
Dwarf*
dwarfopen(Pe *pe)
{
Dwarf *d;
if(pe == nil){
werrstr("nil pe passed to dwarfopen");
return nil;
}
d = mallocz(sizeof(Dwarf), 1);
if(d == nil)
return nil;
d->pe = pe;
if(pe->loadsection(pe, ".debug_abbrev", &d->abbrev) < 0
|| pe->loadsection(pe, ".debug_aranges", &d->aranges) < 0
|| pe->loadsection(pe, ".debug_line", &d->line) < 0
|| pe->loadsection(pe, ".debug_info", &d->info) < 0
|| pe->loadsection(pe, ".debug_loc", &d->loc) < 0)
goto err;
pe->loadsection(pe, ".debug_pubnames", &d->pubnames);
pe->loadsection(pe, ".debug_frame", &d->frame);
pe->loadsection(pe, ".debug_ranges", &d->ranges);
pe->loadsection(pe, ".debug_str", &d->str);
return d;
err:
DPRINT("Failed to open dwarf\n");
free(d->abbrev.data);
free(d->aranges.data);
free(d->frame.data);
free(d->line.data);
free(d->pubnames.data);
free(d->ranges.data);
free(d->str.data);
free(d->info.data);
free(d->loc.data);
free(d);
return nil;
}
void
dwarfclose(Dwarf *d)
{
free(d->abbrev.data);
free(d->aranges.data);
free(d->frame.data);
free(d->line.data);
free(d->pubnames.data);
free(d->ranges.data);
free(d->str.data);
free(d->info.data);
pefree(d->pe);
free(d);
}