diff options
Diffstat (limited to 'sys/ddb/db_examine.c')
| -rw-r--r-- | sys/ddb/db_examine.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c index 79bb1662bbe6..5073e9dfd76d 100644 --- a/sys/ddb/db_examine.c +++ b/sys/ddb/db_examine.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_examine.c,v 1.2 1993/10/16 16:47:13 rgrimes Exp $ + * $Id: db_examine.c,v 1.4 1993/12/19 00:49:43 wollman Exp $ */ /* @@ -31,19 +31,25 @@ * Date: 7/90 */ #include "param.h" +#include "systm.h" #include "proc.h" -#include <machine/db_machdep.h> /* type definitions */ -#include <ddb/db_lex.h> -#include <ddb/db_output.h> -#include <ddb/db_command.h> -#include <ddb/db_sym.h> +#include "ddb/ddb.h" + +#include "ddb/db_lex.h" +#include "ddb/db_output.h" +#include "ddb/db_command.h" +#include "ddb/db_sym.h" +#include "ddb/db_access.h" char db_examine_format[TOK_STRING_SIZE] = "x"; extern db_addr_t db_disasm(/* db_addr_t, boolean_t */); /* instruction disassembler */ +static void db_examine(db_addr_t, char *, int); +static void db_search(db_addr_t, int, db_expr_t, db_expr_t, u_int); + /* * Examine (print) data. */ @@ -64,6 +70,7 @@ db_examine_cmd(addr, have_addr, count, modif) db_examine((db_addr_t) addr, db_examine_format, count); } +static void db_examine(addr, fmt, count) register db_addr_t addr; @@ -237,6 +244,7 @@ db_print_cmd(addr, have_addr, count, modif) db_printf("\n"); } +void db_print_loc_and_inst(loc) db_addr_t loc; { @@ -245,20 +253,12 @@ db_print_loc_and_inst(loc) (void) db_disasm(loc, TRUE); } -db_strcpy(dst, src) - register char *dst; - register char *src; -{ - while (*dst++ = *src++) - ; -} - /* * Search for a value in memory. * Syntax: search [/bhl] addr value [mask] [,count] */ void -db_search_cmd() +db_search_cmd(db_expr_t dummy1, int dummy2, db_expr_t dummy3, char *dummy4) { int t; db_addr_t addr; @@ -290,7 +290,7 @@ db_search_cmd() size = 4; } - if (!db_expression(&addr)) { + if (!db_expression((db_expr_t *)&addr)) { db_printf("Address missing\n"); db_flush_lex(); return; @@ -303,7 +303,7 @@ db_search_cmd() } if (!db_expression(&mask)) - mask = 0xffffffff; + mask = 0xffffffffUL; t = db_read_token(); if (t == tCOMMA) { @@ -321,6 +321,7 @@ db_search_cmd() db_search(addr, size, value, mask, count); } +static void db_search(addr, size, value, mask, count) register db_addr_t addr; |
