aboutsummaryrefslogtreecommitdiff
path: root/src/libmach/dwarfabbrev.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-04-21 05:34:10 +0000
committerrsc <devnull@localhost>2004-04-21 05:34:10 +0000
commiteaf56db5bc78cfec908db84dc792c53ac8ffb90e (patch)
tree99bf2b72a8f1a227e32c5ff3f2b510ab66961ad5 /src/libmach/dwarfabbrev.c
parentae12b879721b02b79a2a2457b36627d24147e74f (diff)
downloadplan9port-eaf56db5bc78cfec908db84dc792c53ac8ffb90e.tar.gz
plan9port-eaf56db5bc78cfec908db84dc792c53ac8ffb90e.tar.bz2
plan9port-eaf56db5bc78cfec908db84dc792c53ac8ffb90e.zip
Fix the bugs I introduced fixing the bug earlier tonight.
Diffstat (limited to 'src/libmach/dwarfabbrev.c')
-rw-r--r--src/libmach/dwarfabbrev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libmach/dwarfabbrev.c b/src/libmach/dwarfabbrev.c
index 2db418dd..503d5149 100644
--- a/src/libmach/dwarfabbrev.c
+++ b/src/libmach/dwarfabbrev.c
@@ -113,6 +113,7 @@ findabbrev(DwarfAbbrev *a, int na, ulong num)
for(i=0; i<na; i++)
if(a[i].num == num)
return &a[i];
+ werrstr("abbrev not found");
return nil;
}
@@ -122,8 +123,10 @@ dwarfgetabbrev(Dwarf *d, ulong off, ulong num)
DwarfAbbrev *a;
int na;
- if((na = loadabbrevs(d, off, &a)) < 0)
+ if((na = loadabbrevs(d, off, &a)) < 0){
+ werrstr("loadabbrevs: %r");
return nil;
+ }
return findabbrev(a, na, num);
}