diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-08-13 00:41:35 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-08-13 00:41:35 +0000 |
commit | 6abab69d1979a465edfbe38d7068261d441373cf (patch) | |
tree | 182cca928f2c1875945bfd4932adeb8ed24b7cc2 /sys/ddb/db_aout.c | |
parent | 9c881530284ee8f126c0c60ee13a84e357d7b328 (diff) |
Kludge to make DDB reverse symbol lookup work again.
I will soon deal with this mess in a 64-bit clean way which the
old code was anything but.
Diffstat (limited to 'sys/ddb/db_aout.c')
-rw-r--r-- | sys/ddb/db_aout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ddb/db_aout.c b/sys/ddb/db_aout.c index edba6dc76fe..79f4abc76a7 100644 --- a/sys/ddb/db_aout.c +++ b/sys/ddb/db_aout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_aout.c,v 1.8 1996/05/10 13:58:43 mickey Exp $ */ +/* $OpenBSD: db_aout.c,v 1.9 1996/08/13 00:41:33 niklas Exp $ */ /* $NetBSD: db_aout.c,v 1.14 1996/02/27 20:54:43 gwr Exp $ */ /* @@ -186,7 +186,7 @@ X_db_search_symbol(symtab, off, strategy, diffp) db_strategy_t strategy; db_expr_t *diffp; /* in/out */ { - register unsigned int diff = *diffp; + register db_expr_t diff = *diffp; register struct nlist *symp = 0; register struct nlist *sp, *ep; @@ -199,7 +199,7 @@ X_db_search_symbol(symtab, off, strategy, diffp) if ((sp->n_type & N_STAB) != 0 || (sp->n_type & N_TYPE) == N_FN) continue; if (off >= sp->n_value) { - if (off - sp->n_value < diff) { + if (off - sp->n_value < diff || diff < 0) { diff = off - sp->n_value; symp = sp; if (diff == 0 && |