From 64f7cc2afc9e58b27b2936e4ab8ab3acc21008ea Mon Sep 17 00:00:00 2001 From: yamt Date: Wed, 13 Nov 2002 05:59:28 +0000 Subject: [PATCH] make stack trace on i386 work again. (signed vs unsigned) --- sys/ddb/db_elf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/ddb/db_elf.c b/sys/ddb/db_elf.c index 75242f61e703..bb5ef505c138 100644 --- a/sys/ddb/db_elf.c +++ b/sys/ddb/db_elf.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_elf.c,v 1.21 2002/11/10 03:12:17 thorpej Exp $ */ +/* $NetBSD: db_elf.c,v 1.22 2002/11/13 05:59:28 yamt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_elf.c,v 1.21 2002/11/10 03:12:17 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_elf.c,v 1.22 2002/11/13 05:59:28 yamt Exp $"); #include #include @@ -266,7 +266,7 @@ db_elf_search_symbol(db_symtab_t *symtab, db_addr_t off, db_strategy_t strategy, db_expr_t *diffp) { Elf_Sym *rsymp, *symp, *symtab_start, *symtab_end; - db_expr_t diff = *diffp; + db_addr_t diff = *diffp; symtab_start = STAB_TO_SYMSTART(symtab); symtab_end = STAB_TO_SYMEND(symtab); @@ -284,7 +284,7 @@ db_elf_search_symbol(db_symtab_t *symtab, db_addr_t off, db_strategy_t strategy, #endif if (off >= symp->st_value) { - if ((db_expr_t)(off - symp->st_value) < diff) { + if (off - symp->st_value < diff) { diff = off - symp->st_value; rsymp = symp; if (diff == 0) { @@ -299,7 +299,7 @@ db_elf_search_symbol(db_symtab_t *symtab, db_addr_t off, db_strategy_t strategy, != STB_LOCAL) break; } - } else if ((db_expr_t)(off - symp->st_value) == diff) { + } else if (off - symp->st_value == diff) { if (rsymp == NULL) rsymp = symp; else if (ELFDEFNNAME(ST_BIND)(rsymp->st_info)