cut dwarf a little slack.

This commit is contained in:
rsc 2004-04-20 05:43:05 +00:00
parent a16e9f2de7
commit ebd395452e
2 changed files with 7 additions and 3 deletions

View file

@ -110,6 +110,10 @@ findfde(Dwarf *d, ulong pc, State *s, DwarfBuf *fde)
ulong len, id, base, size;
DwarfBuf b;
if(d->frame.data == nil){
werrstr("no frame debugging information");
return -1;
}
b.d = d;
b.p = d->frame.data;
b.ep = b.p + d->frame.len;

View file

@ -58,13 +58,13 @@ dwarfopen(Elf *elf)
d->elf = elf;
if(loadsection(elf, ".debug_abbrev", &d->abbrev) < 0
|| loadsection(elf, ".debug_aranges", &d->aranges) < 0
|| loadsection(elf, ".debug_frame", &d->frame) < 0
|| loadsection(elf, ".debug_line", &d->line) < 0
|| loadsection(elf, ".debug_pubnames", &d->pubnames) < 0
|| loadsection(elf, ".debug_ranges", &d->ranges) < 0
|| loadsection(elf, ".debug_str", &d->str) < 0
|| loadsection(elf, ".debug_info", &d->info) < 0)
goto err;
loadsection(elf, ".debug_frame", &d->frame);
loadsection(elf, ".debug_ranges", &d->ranges);
loadsection(elf, ".debug_str", &d->str);
/* make this a table once there are more */
switch(d->elf->hdr.machine){