tcut dwarf a little slack. - plan9port - [fork] Plan 9 from user space (HTM) git clone git://src.adamsgaard.dk/plan9port (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit ebd395452e7f81ece3d3877a04fbe26a324f6a3d (DIR) parent a16e9f2de75587a89515697be0256847ab2a3907 (HTM) Author: rsc <devnull@localhost> Date: Tue, 20 Apr 2004 05:43:05 +0000 cut dwarf a little slack. Diffstat: M src/libmach/dwarfcfa.c | 4 ++++ M src/libmach/dwarfopen.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) --- (DIR) diff --git a/src/libmach/dwarfcfa.c b/src/libmach/dwarfcfa.c t@@ -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; (DIR) diff --git a/src/libmach/dwarfopen.c b/src/libmach/dwarfopen.c t@@ -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){