diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2002-07-01 21:56:56 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2002-07-01 21:56:56 +0000 |
commit | 7285dd9c888db176d011e4194a637926e51618b3 (patch) | |
tree | 09d2029a54e83b9323268545d94ed47038b46106 | |
parent | 120e725e8587366401116a20a0c541752477eaef (diff) |
Don't let variable declarations without "extern" living in .h files.
While there fix a benign type mismatch in db_stack_dump() and remove
diag code left by art by mistake.
-rw-r--r-- | sys/ddb/db_lex.c | 6 | ||||
-rw-r--r-- | sys/ddb/db_lex.h | 7 | ||||
-rw-r--r-- | sys/ddb/db_output.c | 6 | ||||
-rw-r--r-- | sys/ddb/db_print.c | 4 | ||||
-rw-r--r-- | sys/ddb/db_usrreq.c | 4 | ||||
-rw-r--r-- | sys/ddb/db_var.h | 3 |
6 files changed, 13 insertions, 17 deletions
diff --git a/sys/ddb/db_lex.c b/sys/ddb/db_lex.c index 983eb3f704c..ae8243de188 100644 --- a/sys/ddb/db_lex.c +++ b/sys/ddb/db_lex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_lex.c,v 1.7 2001/11/06 19:53:18 miod Exp $ */ +/* $OpenBSD: db_lex.c,v 1.8 2002/07/01 21:56:55 miod Exp $ */ /* $NetBSD: db_lex.c,v 1.8 1996/02/05 01:57:05 christos Exp $ */ /* @@ -45,10 +45,14 @@ #include <ddb/db_command.h> #include <ddb/db_sym.h> #include <ddb/db_extern.h> +#include <ddb/db_var.h> char db_line[120]; char * db_lp, *db_endlp; +db_expr_t db_tok_number; +char db_tok_string[TOK_STRING_SIZE]; + int db_read_line() { diff --git a/sys/ddb/db_lex.h b/sys/ddb/db_lex.h index aaf7d942f9b..79571bb866f 100644 --- a/sys/ddb/db_lex.h +++ b/sys/ddb/db_lex.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_lex.h,v 1.6 2002/03/14 01:26:51 millert Exp $ */ +/* $OpenBSD: db_lex.h,v 1.7 2002/07/01 21:56:55 miod Exp $ */ /* $NetBSD: db_lex.h,v 1.7 1996/02/05 01:57:07 christos Exp $ */ /* @@ -42,10 +42,9 @@ int db_read_token(void); void db_flush_lex(void); int db_lex(void); -db_expr_t db_tok_number; +extern db_expr_t db_tok_number; #define TOK_STRING_SIZE 120 -char db_tok_string[TOK_STRING_SIZE]; -int db_radix; +extern char db_tok_string[TOK_STRING_SIZE]; #define tEOF (-1) #define tEOL 1 diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c index 01e43954719..07554203dd0 100644 --- a/sys/ddb/db_output.c +++ b/sys/ddb/db_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_output.c,v 1.19 2002/05/18 18:22:46 art Exp $ */ +/* $OpenBSD: db_output.c,v 1.20 2002/07/01 21:56:55 miod Exp $ */ /* $NetBSD: db_output.c,v 1.13 1996/04/01 17:27:14 christos Exp $ */ /* @@ -247,8 +247,6 @@ db_stack_dump(void) static int intrace; if (intrace) { -db_panic = 1; -panic("foo"); printf("Faulted in traceback, aborting...\n"); return; } @@ -256,7 +254,7 @@ panic("foo"); intrace = 1; printf("Starting stack trace...\n"); db_stack_trace_print((db_expr_t)__builtin_frame_address(0), TRUE, - 256 /* low limit */, "", printf); + 256 /* low limit */, "", db_printf); printf("End of stack trace.\n"); intrace = 0; } diff --git a/sys/ddb/db_print.c b/sys/ddb/db_print.c index 8f4b91863a4..28dc0592283 100644 --- a/sys/ddb/db_print.c +++ b/sys/ddb/db_print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_print.c,v 1.7 2001/11/06 19:53:18 miod Exp $ */ +/* $OpenBSD: db_print.c,v 1.8 2002/07/01 21:56:55 miod Exp $ */ /* $NetBSD: db_print.c,v 1.5 1996/02/05 01:57:11 christos Exp $ */ /* @@ -46,8 +46,6 @@ #include <ddb/db_output.h> #include <ddb/db_extern.h> -extern unsigned int db_maxoff; - /*ARGSUSED*/ void db_show_regs(addr, have_addr, count, modif) diff --git a/sys/ddb/db_usrreq.c b/sys/ddb/db_usrreq.c index be1a5e730ed..6c33fea8f7b 100644 --- a/sys/ddb/db_usrreq.c +++ b/sys/ddb/db_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_usrreq.c,v 1.5 2001/11/06 19:53:18 miod Exp $ */ +/* $OpenBSD: db_usrreq.c,v 1.6 2002/07/01 21:56:55 miod Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff. All rights reserved. @@ -38,8 +38,6 @@ #include <ddb/db_var.h> -extern int securelevel; - int ddb_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) int *name; diff --git a/sys/ddb/db_var.h b/sys/ddb/db_var.h index e52d91017dc..61d3a6789a6 100644 --- a/sys/ddb/db_var.h +++ b/sys/ddb/db_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_var.h,v 1.5 2002/03/14 01:26:51 millert Exp $ */ +/* $OpenBSD: db_var.h,v 1.6 2002/07/01 21:56:55 miod Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff. All rights reserved. @@ -59,7 +59,6 @@ } #ifdef _KERNEL -extern u_int db_maxoff; extern int db_radix; extern int db_max_width; extern int db_tab_stop_width; |