aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1994-08-18 22:36:09 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1994-08-18 22:36:09 +0000
commitf23b4c91c4fb94e1bb6aeb4e7747f4ccf7767b41 (patch)
tree6b83fdf6eb5926c2f3d175a83d24bf5a2611a012 /sys/ddb
parentfa074287a4952da8528838c7812d02678e4c7205 (diff)
downloadsrc-f23b4c91c4fb94e1bb6aeb4e7747f4ccf7767b41.tar.gz
src-f23b4c91c4fb94e1bb6aeb4e7747f4ccf7767b41.zip
Fix up some sloppy coding practices:
- Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter.
Notes
Notes: svn path=/head/; revision=2112
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_access.c5
-rw-r--r--sys/ddb/db_break.c6
-rw-r--r--sys/ddb/db_command.c17
-rw-r--r--sys/ddb/db_command.h5
-rw-r--r--sys/ddb/db_examine.c5
-rw-r--r--sys/ddb/db_input.c14
-rw-r--r--sys/ddb/db_lex.c6
-rw-r--r--sys/ddb/db_lex.h3
-rw-r--r--sys/ddb/db_print.c4
-rw-r--r--sys/ddb/db_sym.h8
-rw-r--r--sys/ddb/db_trap.c8
-rw-r--r--sys/ddb/db_variables.c3
-rw-r--r--sys/ddb/db_watch.c6
-rw-r--r--sys/ddb/db_watch.h6
14 files changed, 31 insertions, 65 deletions
diff --git a/sys/ddb/db_access.c b/sys/ddb/db_access.c
index 196634d81f0d..7178bbe1c96c 100644
--- a/sys/ddb/db_access.c
+++ b/sys/ddb/db_access.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_access.c,v 1.4 1993/12/19 00:49:42 wollman Exp $
+ * $Id: db_access.c,v 1.5 1994/08/13 03:49:13 wollman Exp $
*/
/*
@@ -40,9 +40,6 @@
* boundaries.
*/
-extern void db_read_bytes(); /* machine-dependent */
-extern void db_write_bytes(); /* machine-dependent */
-
unsigned db_extend[] = { /* table for sign-extending */
0,
0xFFFFFF80U,
diff --git a/sys/ddb/db_break.c b/sys/ddb/db_break.c
index d9f9f2ff04d2..cb9c55e0a1b7 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.3 1993/11/25 01:30:03 wollman Exp $
+ * $Id: db_break.c,v 1.4 1994/08/13 03:49:15 wollman Exp $
*/
/*
@@ -44,10 +44,6 @@
#include <ddb/db_sym.h>
#include <ddb/db_break.h>
-extern boolean_t db_map_equal();
-extern boolean_t db_map_current();
-extern vm_map_t db_map_addr();
-
#define NBREAKPOINTS 100
struct db_breakpoint db_break_table[NBREAKPOINTS];
db_breakpoint_t db_next_free_breakpoint = &db_break_table[0];
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index d7f3f004a795..ed328be8b893 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_command.c,v 1.5 1994/05/25 08:51:12 rgrimes Exp $
+ * $Id: db_command.c,v 1.6 1994/08/13 03:49:16 wollman Exp $
*/
/*
@@ -303,10 +303,9 @@ db_command(last_cmdp, cmd_table)
/*
* 'show' commands
*/
-extern void db_listbreak_cmd();
-extern void db_listwatch_cmd();
-extern void db_show_regs(), db_show_one_thread(), db_show_all_threads();
-extern void vm_map_print(), vm_object_print(), vm_page_print();
+
+extern void db_show_one_thread(), db_show_all_threads();
+extern void vm_page_print();
/* extern void db_ps(); */
extern void ipc_port_print();
void db_show_help();
@@ -338,14 +337,6 @@ struct command db_show_cmds[] = {
{ (char *)0, }
};
-extern void db_print_cmd(), db_examine_cmd(), db_set_cmd();
-extern void db_search_cmd();
-extern void db_write_cmd();
-extern void db_delete_cmd(), db_breakpoint_cmd();
-extern void db_deletewatch_cmd(), db_watchpoint_cmd();
-extern void db_single_step_cmd(), db_trace_until_call_cmd(),
- db_trace_until_matching_cmd(), db_continue_cmd();
-extern void db_stack_trace_cmd();
void db_help_cmd();
void db_fncall();
diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h
index 38e86fd9a2d7..9000cd049649 100644
--- a/sys/ddb/db_command.h
+++ b/sys/ddb/db_command.h
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_command.h,v 1.3 1993/11/07 17:39:22 wollman Exp $
+ * $Id: db_command.h,v 1.4 1994/08/13 03:49:16 wollman Exp $
*/
#ifndef _DDB_DB_COMMAND_H_
@@ -42,9 +42,6 @@
#include <machine/db_machdep.h>
extern void db_command_loop();
-extern void db_skip_to_eol();
-
-extern void db_error(/* char * */); /* report error */
extern db_addr_t db_dot; /* current location */
extern db_addr_t db_last_addr; /* last explicit address typed */
diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c
index 7fd55a2f534c..9d3924bd7154 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.4 1993/12/19 00:49:43 wollman Exp $
+ * $Id: db_examine.c,v 1.5 1994/08/13 03:49:17 wollman Exp $
*/
/*
@@ -44,9 +44,6 @@
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);
diff --git a/sys/ddb/db_input.c b/sys/ddb/db_input.c
index d768992575fe..4697a8c8f3fc 100644
--- a/sys/ddb/db_input.c
+++ b/sys/ddb/db_input.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_input.c,v 1.4 1993/12/19 00:49:44 wollman Exp $
+ * $Id: db_input.c,v 1.5 1994/08/13 03:49:19 wollman Exp $
*/
/*
@@ -194,6 +194,12 @@ db_inputchar(c)
}
int
+cnmaygetc (void)
+{
+ return (-1);
+}
+
+int
db_readline(lstart, lsize)
char * lstart;
int lsize;
@@ -242,12 +248,6 @@ db_check_interrupt()
}
}
-int
-cnmaygetc (void)
-{
- return (-1);
-}
-
/* called from kdb_trap in db_interface.c */
void
cnpollc (flag)
diff --git a/sys/ddb/db_lex.c b/sys/ddb/db_lex.c
index 1c883d883dd2..8f5f4b0b4813 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.3 1993/11/25 01:30:07 wollman Exp $
+ * $Id: db_lex.c,v 1.4 1994/08/13 03:49:20 wollman Exp $
*/
/*
@@ -41,6 +41,8 @@
char db_line[120];
char * db_lp, *db_endlp;
+static int db_lex(void);
+
int
db_read_line()
{
@@ -122,7 +124,7 @@ db_flush_lex()
db_look_token = 0;
}
-int
+static int
db_lex()
{
int c;
diff --git a/sys/ddb/db_lex.h b/sys/ddb/db_lex.h
index e2f224eccd16..db1d2b9f20ce 100644
--- a/sys/ddb/db_lex.h
+++ b/sys/ddb/db_lex.h
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_lex.h,v 1.2 1993/10/16 16:47:19 rgrimes Exp $
+ * $Id: db_lex.h,v 1.3 1993/11/07 17:39:23 wollman Exp $
*/
#ifndef _DDB_DB_LEX_H_
@@ -47,7 +47,6 @@ extern void db_flush_lex();
extern int db_tok_number;
#define TOK_STRING_SIZE 120
extern char db_tok_string[TOK_STRING_SIZE];
-extern int db_radix;
#define tEOF (-1)
#define tEOL 1
diff --git a/sys/ddb/db_print.c b/sys/ddb/db_print.c
index 10c4bcd57114..a0694b0c27c3 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.3 1993/11/25 01:30:09 wollman Exp $
+ * $Id: db_print.c,v 1.4 1994/08/13 03:49:21 wollman Exp $
*/
/*
@@ -44,8 +44,6 @@
#include <ddb/db_variables.h>
#include <ddb/db_sym.h>
-extern unsigned int db_maxoff;
-
void
db_show_regs(db_expr_t dummy1, int dummy2, db_expr_t dummy3, char *dummy4)
{
diff --git a/sys/ddb/db_sym.h b/sys/ddb/db_sym.h
index a256b79ed229..d1090cf7123f 100644
--- a/sys/ddb/db_sym.h
+++ b/sys/ddb/db_sym.h
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_sym.h,v 1.2 1993/10/16 16:47:27 rgrimes Exp $
+ * $Id: db_sym.h,v 1.3 1993/11/07 17:39:25 wollman Exp $
*/
#ifndef _DDB_DB_SYM_H_
@@ -77,9 +77,6 @@ extern boolean_t db_qualify_ambiguous_names;
extern void db_add_symbol_table();
/* extend the list of symbol tables */
-extern int db_value_of_name(/* char*, db_expr_t* */);
- /* find symbol value given name */
-
extern db_sym_t db_search_symbol(/* db_expr_t, db_strategy_t, int* */);
/* find symbol given value */
@@ -99,4 +96,7 @@ extern int db_eqname(/* char*, char*, char */);
extern void db_printsym(/* db_expr_t, db_strategy_t */);
/* print closest symbol to a value */
+extern boolean_t db_line_at_pc(int, int, int, int);
+extern int X_db_sym_nymargs(db_symtab_t *, db_sym_t, int *, char **);
+
#endif /* _DDB_DB_SYM_H_ */
diff --git a/sys/ddb/db_trap.c b/sys/ddb/db_trap.c
index 05b0487e1c92..8d2941ab5f88 100644
--- a/sys/ddb/db_trap.c
+++ b/sys/ddb/db_trap.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_trap.c,v 1.3 1993/11/25 01:30:12 wollman Exp $
+ * $Id: db_trap.c,v 1.4 1994/08/13 03:49:24 wollman Exp $
*/
/*
@@ -41,12 +41,6 @@
#include <ddb/db_command.h>
#include <ddb/db_break.h>
-extern void db_restart_at_pc();
-extern boolean_t db_stop_at_pc();
-
-extern int db_inst_count;
-extern int db_load_count;
-extern int db_store_count;
void
db_trap(type, code)
diff --git a/sys/ddb/db_variables.c b/sys/ddb/db_variables.c
index fe5230a20256..4a6acf2f6182 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.3 1993/11/25 01:30:13 wollman Exp $
+ * $Id: db_variables.c,v 1.4 1994/08/13 03:49:25 wollman Exp $
*/
/*
@@ -39,7 +39,6 @@
#include <ddb/db_lex.h>
#include <ddb/db_variables.h>
-void db_read_variable(struct db_variable *, db_expr_t *);
static void db_write_variable(struct db_variable *, db_expr_t *);
struct db_variable db_vars[] = {
diff --git a/sys/ddb/db_watch.c b/sys/ddb/db_watch.c
index afeedf4f12b6..fb6680fd47a4 100644
--- a/sys/ddb/db_watch.c
+++ b/sys/ddb/db_watch.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_watch.c,v 1.3 1993/11/25 01:30:15 wollman Exp $
+ * $Id: db_watch.c,v 1.4 1994/08/13 03:49:25 wollman Exp $
*/
/*
@@ -46,10 +46,6 @@
* Watchpoints.
*/
-extern boolean_t db_map_equal();
-extern boolean_t db_map_current();
-extern vm_map_t db_map_addr();
-
boolean_t db_watchpoints_inserted = TRUE;
#define NWATCHPOINTS 100
diff --git a/sys/ddb/db_watch.h b/sys/ddb/db_watch.h
index f8932de39de9..d564ad24afbf 100644
--- a/sys/ddb/db_watch.h
+++ b/sys/ddb/db_watch.h
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id$
+ * $Id: db_watch.h,v 1.2 1993/10/16 16:47:33 rgrimes Exp $
*/
/*
@@ -50,8 +50,8 @@ typedef struct db_watchpoint {
extern boolean_t db_find_watchpoint(/* vm_map_t map, db_addr_t addr,
db_regs_t *regs */);
-extern void db_set_watchpoints();
-extern void db_clear_watchpoints();
+
+
extern void db_set_watchpoint(/* vm_map_t map, db_addr_t addr, vm_size_t size */);
extern void db_delete_watchpoint(/* vm_map_t map, db_addr_t addr */);