diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-08-04 01:27:47 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-08-04 01:27:47 +0000 |
commit | 0f4c96ac1d778b84b93ac87c9e1c24ae1e04a0b1 (patch) | |
tree | 4f9f4694b6d804f3b77af7bb17dd3f66390ef33e /sys | |
parent | f64107dbfe03774caedb4c9c3487212149baefca (diff) |
Make compile on OpenBSD/alpha. MD stuff is still missing though.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ddb/db_examine.c | 11 | ||||
-rw-r--r-- | sys/ddb/db_extern.h | 4 | ||||
-rw-r--r-- | sys/ddb/db_output.c | 4 | ||||
-rw-r--r-- | sys/ddb/db_sym.c | 8 |
4 files changed, 15 insertions, 12 deletions
diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c index cca67eea3f6..539686d7e43 100644 --- a/sys/ddb/db_examine.c +++ b/sys/ddb/db_examine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_examine.c,v 1.4 1996/04/21 22:18:59 deraadt Exp $ */ +/* $OpenBSD: db_examine.c,v 1.5 1996/08/04 01:27:45 niklas Exp $ */ /* $NetBSD: db_examine.c,v 1.11 1996/03/30 22:30:07 christos Exp $ */ /* @@ -262,7 +262,7 @@ db_search_cmd(daddr, have_addr, dcount, modif) int size; db_expr_t value; db_expr_t mask; - unsigned int count; + db_expr_t count; t = db_read_token(); if (t == tSLASH) { @@ -312,7 +312,7 @@ db_search_cmd(daddr, have_addr, dcount, modif) } } else { db_unread_token(t); - count = -1; /* effectively forever */ + count = -1; /* forever */ } db_skip_to_eol(); @@ -326,9 +326,10 @@ db_search(addr, size, value, mask, count) int size; db_expr_t value; db_expr_t mask; - unsigned int count; + db_expr_t count; { - while (count-- != 0) { + /* Negative counts means forever. */ + while (count < 0 || count-- != 0) { db_prev = addr; if ((db_get_value(addr, size, FALSE) & mask) == value) break; diff --git a/sys/ddb/db_extern.h b/sys/ddb/db_extern.h index c8dbe2fffcc..594f250dd20 100644 --- a/sys/ddb/db_extern.h +++ b/sys/ddb/db_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_extern.h,v 1.4 1996/05/10 13:58:43 mickey Exp $ */ +/* $OpenBSD: db_extern.h,v 1.5 1996/08/04 01:27:45 niklas Exp $ */ /* $NetBSD: db_extern.h,v 1.1 1996/02/05 01:57:00 christos Exp $ */ /* @@ -53,7 +53,7 @@ void db_print_cmd __P((db_expr_t, int, db_expr_t, char *)); void db_print_loc_and_inst __P((db_addr_t)); void db_strcpy __P((char *, char *)); void db_search_cmd __P((db_expr_t, boolean_t, db_expr_t, char *)); -void db_search __P((db_addr_t, int, db_expr_t, db_expr_t, unsigned int)); +void db_search __P((db_addr_t, int, db_expr_t, db_expr_t, db_expr_t)); /* db_expr.c */ boolean_t db_term __P((db_expr_t *)); diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c index 490954eeae3..bd89c7378cc 100644 --- a/sys/ddb/db_output.c +++ b/sys/ddb/db_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_output.c,v 1.7 1996/07/24 21:58:03 niklas Exp $ */ +/* $OpenBSD: db_output.c,v 1.8 1996/08/04 01:27:46 niklas Exp $ */ /* $NetBSD: db_output.c,v 1.13 1996/04/01 17:27:14 christos Exp $ */ /* @@ -45,6 +45,8 @@ #include <ddb/db_sym.h> #include <ddb/db_extern.h> +#include <lib/libkern/libkern.h> + /* * Character output - tracks position in line. * To do this correctly, we should know how wide diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index e56033f83c2..d9ee76e3deb 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_sym.c,v 1.11 1996/05/31 10:37:25 niklas Exp $ */ +/* $OpenBSD: db_sym.c,v 1.12 1996/08/04 01:27:46 niklas Exp $ */ /* $NetBSD: db_sym.c,v 1.12 1996/02/05 01:57:15 christos Exp $ */ /* @@ -263,8 +263,8 @@ db_search_symbol( val, strategy, offp) db_expr_t *offp; { register - unsigned int diff; - unsigned int newdiff; + db_expr_t diff; + db_expr_t newdiff; db_symtab_t st; db_sym_t ret = DB_SYM_NULL, sym; @@ -326,7 +326,7 @@ db_symbol_values(sym, namep, valuep) * add support for symbols in loadable driver modules. */ extern char end[]; -unsigned int db_lastsym = (unsigned long)end; +unsigned long db_lastsym = (unsigned long)end; db_expr_t db_maxoff = 0x10000000; |