diff options
author | dfr <dfr@FreeBSD.org> | 1998-06-07 17:13:14 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-06-07 17:13:14 +0000 |
commit | 1d5f38ac2264102518a09c66a7b285f57e81e67e (patch) | |
tree | 83ce2f0e2b8041d2c933d3beffc1f4465ea5b929 /sys/ddb | |
parent | 83423d0e5a4ad035e44392f0427cb39232031e45 (diff) | |
download | FreeBSD-src-1d5f38ac2264102518a09c66a7b285f57e81e67e.zip FreeBSD-src-1d5f38ac2264102518a09c66a7b285f57e81e67e.tar.gz |
This commit fixes various 64bit portability problems required for
FreeBSD/alpha. The most significant item is to change the command
argument to ioctl functions from int to u_long. This change brings us
inline with various other BSD versions. Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.
The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
Diffstat (limited to 'sys/ddb')
-rw-r--r-- | sys/ddb/db_aout.c | 4 | ||||
-rw-r--r-- | sys/ddb/db_break.c | 9 | ||||
-rw-r--r-- | sys/ddb/db_break.h | 4 | ||||
-rw-r--r-- | sys/ddb/db_examine.c | 4 | ||||
-rw-r--r-- | sys/ddb/db_lex.c | 4 | ||||
-rw-r--r-- | sys/ddb/db_output.c | 6 | ||||
-rw-r--r-- | sys/ddb/db_print.c | 4 | ||||
-rw-r--r-- | sys/ddb/db_run.c | 10 | ||||
-rw-r--r-- | sys/ddb/db_sym.c | 6 | ||||
-rw-r--r-- | sys/ddb/db_variables.c | 4 | ||||
-rw-r--r-- | sys/ddb/db_variables.h | 4 | ||||
-rw-r--r-- | sys/ddb/ddb.h | 14 |
12 files changed, 39 insertions, 34 deletions
diff --git a/sys/ddb/db_aout.c b/sys/ddb/db_aout.c index 3f7ed96..d60b459 100644 --- a/sys/ddb/db_aout.c +++ b/sys/ddb/db_aout.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_aout.c,v 1.18 1997/04/01 14:31:04 bde Exp $ + * $Id: db_aout.c,v 1.19 1997/09/28 08:34:46 phk Exp $ */ /* @@ -324,11 +324,13 @@ X_db_sym_numargs(symtab, cursym, nargp, argnamep) void kdb_init() { +#ifdef __i386__ if (bootinfo.bi_esymtab != bootinfo.bi_symtab) X_db_sym_init((int *)bootinfo.bi_symtab, (char *)((bootinfo.bi_esymtab + sizeof(int) - 1) & ~(sizeof(int) - 1)), "kernel"); +#endif } #if 0 diff --git a/sys/ddb/db_break.c b/sys/ddb/db_break.c index 6f7776b..4b9269c 100644 --- a/sys/ddb/db_break.c +++ b/sys/ddb/db_break.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_break.c,v 1.13 1997/02/22 09:28:20 peter Exp $ + * $Id: db_break.c,v 1.14 1997/06/14 11:52:36 bde Exp $ */ /* @@ -208,13 +208,13 @@ db_clear_breakpoints() } } -#ifdef notused +#ifdef SOFTWARE_SSTEP /* * Set a temporary breakpoint. * The instruction is changed immediately, * so the breakpoint does not have to be on the breakpoint list. */ -static db_breakpoint_t +db_breakpoint_t db_set_temp_breakpoint(addr) db_addr_t addr; { @@ -237,13 +237,14 @@ db_set_temp_breakpoint(addr) return bkpt; } -static void +void db_delete_temp_breakpoint(bkpt) db_breakpoint_t bkpt; { db_put_value(bkpt->address, BKPT_SIZE, bkpt->bkpt_inst); db_breakpoint_free(bkpt); } + #endif /* diff --git a/sys/ddb/db_break.h b/sys/ddb/db_break.h index 1de8727..21d5ce0 100644 --- a/sys/ddb/db_break.h +++ b/sys/ddb/db_break.h @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id$ + * $Id: db_break.h,v 1.9 1997/02/22 09:28:20 peter Exp $ */ /* @@ -53,5 +53,7 @@ typedef struct db_breakpoint *db_breakpoint_t; void db_clear_breakpoints __P((void)); db_breakpoint_t db_find_breakpoint_here __P((db_addr_t addr)); void db_set_breakpoints __P((void)); +db_breakpoint_t db_set_temp_breakpoint __P((db_addr_t)); +void db_delete_temp_breakpoint __P((db_breakpoint_t)); #endif /* !_DDB_DB_BREAK_H_ */ diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c index 7a0777c..3214f61 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.16 1997/02/22 09:28:22 peter Exp $ + * $Id: db_examine.c,v 1.17 1997/04/01 14:31:05 bde Exp $ */ /* @@ -257,7 +257,7 @@ db_search_cmd(dummy1, dummy2, dummy3, dummy4) int size; db_expr_t value; db_expr_t mask; - unsigned int count; + db_expr_t count; t = db_read_token(); if (t == tSLASH) { diff --git a/sys/ddb/db_lex.c b/sys/ddb/db_lex.c index edcaa0c..ae13e8c 100644 --- a/sys/ddb/db_lex.c +++ b/sys/ddb/db_lex.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_lex.c,v 1.13 1997/02/22 09:28:25 peter Exp $ + * $Id: db_lex.c,v 1.14 1997/06/14 11:52:36 bde Exp $ */ /* @@ -117,7 +117,7 @@ db_read_token() int db_tok_number; char db_tok_string[TOK_STRING_SIZE]; -int db_radix = 16; +long db_radix = 16; void db_flush_lex() diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c index d0bb093..6aef208 100644 --- a/sys/ddb/db_output.c +++ b/sys/ddb/db_output.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_output.c,v 1.21 1997/02/22 09:28:26 peter Exp $ + * $Id: db_output.c,v 1.22 1997/04/01 14:31:06 bde Exp $ */ /* @@ -58,10 +58,10 @@ */ static int db_output_position = 0; /* output column */ static int db_last_non_space = 0; /* last non-space character */ -int db_tab_stop_width = 8; /* how wide are tab stops? */ +long db_tab_stop_width = 8; /* how wide are tab stops? */ #define NEXT_TAB(i) \ ((((i) + db_tab_stop_width) / db_tab_stop_width) * db_tab_stop_width) -int db_max_width = 79; /* output line width */ +long db_max_width = 79; /* output line width */ static void db_putchar __P((int c, void *arg)); diff --git a/sys/ddb/db_print.c b/sys/ddb/db_print.c index 49a580b..8140d43 100644 --- a/sys/ddb/db_print.c +++ b/sys/ddb/db_print.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_print.c,v 1.16 1998/05/19 18:42:06 phk Exp $ + * $Id: db_print.c,v 1.17 1998/05/28 09:29:50 phk Exp $ */ /* @@ -55,7 +55,7 @@ db_show_regs(dummy1, dummy2, dummy3, dummy4) db_read_variable(regp, &value); db_printf("%-12s%#10n", regp->name, value); db_find_xtrn_sym_and_offset((db_addr_t)value, &name, &offset); - if (name != 0 && offset <= db_maxoff && offset != value) { + if (name != 0 && offset <= db_maxoff && offset != value) { db_printf("\t%s", name); if (offset != 0) db_printf("+%+#n", offset); diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c index 598a117..a705bc1 100644 --- a/sys/ddb/db_run.c +++ b/sys/ddb/db_run.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_run.c,v 1.12 1997/02/22 09:28:29 peter Exp $ + * $Id: db_run.c,v 1.13 1997/06/14 11:52:37 bde Exp $ */ /* @@ -60,7 +60,7 @@ int db_load_count; int db_store_count; #ifndef db_set_single_step -extern void db_set_single_step __P((db_regs_t *regs); +extern void db_set_single_step __P((db_regs_t *regs)); #endif #ifndef db_clear_single_step extern void db_clear_single_step __P((db_regs_t *regs)); @@ -104,7 +104,9 @@ db_stop_at_pc(is_breakpoint) return (TRUE); /* stop here */ } } else if (*is_breakpoint) { +#ifdef __i386__ /* XXx */ ddb_regs.tf_eip += 1; +#endif } *is_breakpoint = FALSE; @@ -270,9 +272,7 @@ db_set_single_step(regs) */ inst = db_get_value(pc, sizeof(int), FALSE); if (inst_branch(inst) || inst_call(inst)) { - extern unsigned getreg_val(); - - brpc = branch_taken(inst, pc, getreg_val, regs); + brpc = branch_taken(inst, pc, regs); if (brpc != pc) { /* self-branches are hopeless */ db_taken_bkpt = db_set_temp_breakpoint(brpc); } diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index 0eed0cb..40f3651 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_sym.c,v 1.19 1997/06/30 23:49:16 bde Exp $ + * $Id: db_sym.c,v 1.20 1997/06/30 23:54:49 bde Exp $ */ /* @@ -222,7 +222,7 @@ db_search_symbol( val, strategy, offp) { register unsigned int diff; - unsigned int newdiff; + size_t newdiff; register int i; db_sym_t ret = DB_SYM_NULL, sym; @@ -281,7 +281,7 @@ db_symbol_values(sym, namep, valuep) * not accept symbols whose value is "small" (and use plain hex). */ -unsigned int db_maxoff = 0x10000; +unsigned long db_maxoff = 0x10000; void db_printsym(off, strategy) diff --git a/sys/ddb/db_variables.c b/sys/ddb/db_variables.c index 0cab001..74a45bb 100644 --- a/sys/ddb/db_variables.c +++ b/sys/ddb/db_variables.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_variables.c,v 1.13 1997/02/22 09:28:31 peter Exp $ + * $Id: db_variables.c,v 1.14 1997/06/14 11:52:37 bde Exp $ */ /* @@ -46,7 +46,7 @@ static int db_set_variable __P((db_expr_t value)); static struct db_variable db_vars[] = { { "radix", &db_radix, FCN_NULL }, - { "maxoff", (int *)&db_maxoff, FCN_NULL }, + { "maxoff", (long *)&db_maxoff, FCN_NULL }, { "maxwidth", &db_max_width, FCN_NULL }, { "tabstops", &db_tab_stop_width, FCN_NULL }, }; diff --git a/sys/ddb/db_variables.h b/sys/ddb/db_variables.h index 98b83a4..1359f01 100644 --- a/sys/ddb/db_variables.h +++ b/sys/ddb/db_variables.h @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_variables.h,v 1.7 1997/02/22 09:28:32 peter Exp $ + * $Id: db_variables.h,v 1.8 1997/06/30 23:54:50 bde Exp $ */ /* @@ -42,7 +42,7 @@ typedef int db_varfcn_t __P((struct db_variable *vp, db_expr_t *valuep, int op)); struct db_variable { char *name; /* Name of variable */ - int *valuep; /* value of variable */ + long *valuep; /* value of variable */ /* function to call when reading/writing */ db_varfcn_t *fcn; #define DB_VAR_GET 0 diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h index e704561..01ef378 100644 --- a/sys/ddb/ddb.h +++ b/sys/ddb/ddb.h @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ddb.h,v 1.16 1998/05/19 11:02:24 phk Exp $ + * $Id: ddb.h,v 1.17 1998/05/19 18:42:09 phk Exp $ */ /* @@ -66,14 +66,14 @@ func_name(addr, have_addr, count, modif) \ char *modif; extern char *esym; -extern unsigned int db_maxoff; +extern unsigned long db_maxoff; extern int db_indent; extern int db_inst_count; extern int db_load_count; extern int db_store_count; -extern int db_radix; -extern int db_max_width; -extern int db_tab_stop_width; +extern long db_radix; +extern long db_max_width; +extern long db_tab_stop_width; struct vm_map; @@ -91,7 +91,7 @@ boolean_t db_map_current __P((struct vm_map *)); boolean_t db_map_equal __P((struct vm_map *, struct vm_map *)); void db_print_loc_and_inst __P((db_addr_t loc)); void db_printf __P((const char *fmt, ...)); -void db_read_bytes __P((vm_offset_t addr, int size, char *data)); +void db_read_bytes __P((vm_offset_t addr, size_t size, char *data)); /* machine-dependent */ int db_readline __P((char *lstart, int lsize)); void db_restart_at_pc __P((boolean_t watchpt)); @@ -101,7 +101,7 @@ boolean_t db_stop_at_pc __P((boolean_t *is_breakpoint)); #define db_strcpy strcpy void db_trap __P((int type, int code)); int db_value_of_name __P((char *name, db_expr_t *valuep)); -void db_write_bytes __P((vm_offset_t addr, int size, char *data)); +void db_write_bytes __P((vm_offset_t addr, size_t size, char *data)); /* machine-dependent */ void kdb_init __P((void)); void kdbprintf __P((const char *fmt, ...)); |