Index: ddb/db_aout.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_aout.c,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 db_aout.c
--- ddb/db_aout.c	8 Nov 2006 01:45:43 -0000	1.2.2.2
+++ ddb/db_aout.c	15 Nov 2006 17:15:51 -0000
@@ -37,6 +37,7 @@
 #include <string.h>
 #include <mach/std_types.h>
 #include <machine/db_machdep.h>		/* data types */
+#include <ddb/db_output.h>
 #include <ddb/db_sym.h>
 
 #ifndef	DB_NO_AOUT
Index: ddb/db_break.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_break.c,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 db_break.c
--- ddb/db_break.c	15 Oct 2006 14:59:03 -0000	1.2.2.1
+++ ddb/db_break.c	15 Nov 2006 17:15:51 -0000
@@ -43,6 +43,9 @@
 #include <ddb/db_variables.h>
 #include <ddb/db_command.h>
 #include <ddb/db_task_thread.h>
+#include <ddb/db_output.h>
+#include <ddb/db_cond.h>
+#include <ddb/db_expr.h>
 
 #define	NBREAKPOINTS	100
 #define NTHREAD_LIST	(NBREAKPOINTS*3)
@@ -594,7 +597,7 @@ db_list_breakpoints()
 void
 db_delete_cmd()
 {
-	register n;
+	register int n;
 	thread_t thread;
 	vm_offset_t task_thd;
 	boolean_t user_global = FALSE;
@@ -677,7 +680,7 @@ db_breakpoint_cmd(addr, have_addr, count
 	db_expr_t	count;
 	char *		modif;
 {
-	register n;
+	register int n;
 	thread_t thread;
 	boolean_t user_global = db_option(modif, 'U');
 	boolean_t task_bpt = db_option(modif, 'T');
Index: ddb/db_command.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_command.c,v
retrieving revision 1.2.2.5
diff -u -p -r1.2.2.5 db_command.c
--- ddb/db_command.c	10 Nov 2006 01:22:57 -0000	1.2.2.5
+++ ddb/db_command.c	15 Nov 2006 17:15:51 -0000
@@ -42,6 +42,9 @@
 #include <ddb/db_output.h>
 #include <ddb/db_command.h>
 #include <ddb/db_task_thread.h>
+#include <ddb/db_macro.h>
+#include <ddb/db_expr.h>
+#include <ddb/db_examine.h>
 
 #include <machine/setjmp.h>
 #include <kern/debug.h>
Index: ddb/db_command.h
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_command.h,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 db_command.h
--- ddb/db_command.h	15 Oct 2006 14:59:03 -0000	1.2.2.1
+++ ddb/db_command.h	15 Nov 2006 17:15:51 -0000
@@ -67,4 +67,6 @@ struct db_command {
 	struct db_command *more;   /* another level of command */
 };
 
+extern boolean_t db_exec_cmd_nest(char *cmd, int size);
+
 #endif /* MACH_KDB */
Index: ddb/db_cond.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_cond.c,v
retrieving revision 1.2.2.3
diff -u -p -r1.2.2.3 db_cond.c
--- ddb/db_cond.c	10 Nov 2006 01:22:57 -0000	1.2.2.3
+++ ddb/db_cond.c	15 Nov 2006 17:15:52 -0000
@@ -32,6 +32,9 @@
 #include <ddb/db_lex.h>
 #include <ddb/db_break.h>
 #include <ddb/db_command.h>
+#include <ddb/db_cond.h>
+#include <ddb/db_expr.h>
+#include <ddb/db_output.h>
 
 #include <kern/debug.h>
 
@@ -122,7 +125,7 @@ db_cond_print(bkpt)
 void
 db_cond_cmd()
 {
-	register  c;
+	register  int c;
 	register  struct db_cond *cp;
 	register  char *p;
 	db_expr_t value;
Index: ddb/db_cond.h
===================================================================
RCS file: ddb/db_cond.h
diff -N ddb/db_cond.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ddb/db_cond.h	15 Nov 2006 17:15:52 -0000
@@ -0,0 +1,40 @@
+/*
+ *
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *	Author: Barry deFreese.
+ */
+/*
+ *
+ *
+ */
+
+#ifndef _DDB_DB_COND_H_
+#define _DDB_DB_COND_H_
+
+#include <sys/types.h>
+#include <machine/db_machdep.h>
+
+extern void db_cond_free(db_thread_breakpoint_t bkpt);
+
+extern boolean_t db_cond_check(db_thread_breakpoint_t bkpt);
+
+extern void db_cond_print(db_thread_breakpoint_t bkpt);
+
+extern void db_cond_cmd(void);
+
+#endif /* _DDB_DB_COND_H_ */
Index: ddb/db_examine.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_examine.c,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 db_examine.c
--- ddb/db_examine.c	15 Oct 2006 14:59:03 -0000	1.2.2.1
+++ ddb/db_examine.c	15 Nov 2006 17:15:52 -0000
@@ -32,6 +32,7 @@
 
 #include <mach/boolean.h>
 #include <machine/db_machdep.h>
+#include <machine/db_interface.h>
 
 #include <ddb/db_access.h>
 #include <ddb/db_lex.h>
@@ -39,6 +40,8 @@
 #include <ddb/db_command.h>
 #include <ddb/db_sym.h>
 #include <ddb/db_task_thread.h>
+#include <ddb/db_examine.h>
+#include <ddb/db_expr.h>
 #include <kern/thread.h>
 #include <kern/task.h>
 #include <mach/vm_param.h>
@@ -53,9 +56,6 @@ thread_t	db_examine_thread = THREAD_NULL
 extern	db_addr_t db_disasm(db_addr_t pc, boolean_t altform, task_t task);
 			/* instruction disassembler */
 
-void db_examine();/*forwards*/
-void db_strcpy();
-
 /*
  * Examine (print) data.
  */
@@ -458,7 +458,7 @@ db_xcdump(addr, size, count, task)
 	int		count;
 	task_t		task;
 {
-	register 	i, n;
+	register 	int i, n;
 	db_expr_t	value;
 	int		bcount;
 	db_addr_t	off;
Index: ddb/db_examine.h
===================================================================
RCS file: ddb/db_examine.h
diff -N ddb/db_examine.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ddb/db_examine.h	15 Nov 2006 17:15:52 -0000
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *	Author: Barry deFreese.
+ */
+/*
+ *
+ *
+ */
+
+#ifndef _DDB_DB_EXAMINE_H_
+#define _DDB_DB_EXAMINE_H_
+
+#include <sys/types.h>
+#include <ddb/db_variables.h>
+#include <ddb/db_expr.h>
+
+extern void db_examine_cmd(
+	db_expr_t addr, 
+	int have_addr, 
+	db_expr_t count,
+	char *modif);
+
+extern void db_strcpy(char *dst, char *src);
+
+extern void db_examine(
+	db_addr_t addr,
+	char *fmt,
+	int count,
+	task_t task);
+
+extern int db_xcdump(
+	db_addr_t addr,
+	int size,
+	int count,
+	task_t);
+
+extern void db_print_loc_and_inst(
+	db_addr_t loc,
+	task_t task);
+
+#endif /* _DDB_DB_EXAMINE_H_ */
Index: ddb/db_expr.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_expr.c,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 db_expr.c
--- ddb/db_expr.c	15 Oct 2006 14:59:03 -0000	1.2.2.1
+++ ddb/db_expr.c	15 Nov 2006 17:15:52 -0000
@@ -35,6 +35,10 @@
 #include <ddb/db_lex.h>
 #include <ddb/db_access.h>
 #include <ddb/db_command.h>
+#include <ddb/db_expr.h>
+#include <ddb/db_output.h>
+#include <ddb/db_sym.h>
+#include <ddb/db_variables.h>
 #include <kern/task.h>
 
 
Index: ddb/db_input.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_input.c,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 db_input.c
--- ddb/db_input.c	15 Oct 2006 14:59:03 -0000	1.2.2.1
+++ ddb/db_input.c	15 Nov 2006 17:15:52 -0000
@@ -32,10 +32,9 @@
 
 #include <mach/boolean.h>
 #include <machine/db_machdep.h>
+#include <ddb/db_command.h>
 #include <ddb/db_output.h>
 
-
-
 #ifndef DB_HISTORY_SIZE
 #define DB_HISTORY_SIZE 4000
 #endif /* DB_HISTORY_SIZE */
Index: ddb/db_input.h
===================================================================
RCS file: ddb/db_input.h
diff -N ddb/db_input.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ddb/db_input.h	15 Nov 2006 17:15:52 -0000
@@ -0,0 +1,33 @@
+/*
+ *
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *	Author: Barry deFreese.
+ */
+/*
+ *
+ *
+ */
+
+#ifndef _DDB_DB_INPUT_H_
+#define _DDB_DB_INPUT_H_
+
+#include <sys/types.h>
+
+extern int db_readline(char *lstart, int lsize);
+
+#endif /* _DDB_DB_INPUT_H_ */
Index: ddb/db_lex.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_lex.c,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 db_lex.c
--- ddb/db_lex.c	8 Nov 2006 01:45:43 -0000	1.2.2.2
+++ ddb/db_lex.c	15 Nov 2006 17:15:52 -0000
@@ -35,7 +35,11 @@
  */
 #include <string.h>
 #include <machine/db_machdep.h>
+#include <ddb/db_command.h>
+#include <ddb/db_examine.h>
+#include <ddb/db_input.h>
 #include <ddb/db_lex.h>
+#include <ddb/db_output.h>
 
 char	db_line[DB_LEX_LINE_SIZE];
 char	db_last_line[DB_LEX_LINE_SIZE];
@@ -175,9 +179,9 @@ db_flush_lex()
 void
 db_skip_to_eol()
 {
-	register skip;
-	register t;
-	register n;
+	register int skip;
+	register int t;
+	register int n;
 	register char *p;
 
 	t = db_read_token();
@@ -202,7 +206,7 @@ int
 db_lex()
 {
 	register char *cp;
-	register c;
+	register int c;
 
 	c = db_read_char();
 	while (c <= ' ' || c > '~') {
Index: ddb/db_lex.h
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_lex.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 db_lex.h
--- ddb/db_lex.h	25 Feb 1997 21:28:12 -0000	1.1.1.1
+++ ddb/db_lex.h	15 Nov 2006 17:15:52 -0000
@@ -41,6 +41,7 @@ struct db_lex_context {
 	char *l_eptr;		/* line end pointer */
 };
 
+extern int	db_lex();
 extern int	db_read_line(/* char *rep_str */);
 extern void	db_flush_line();
 extern int	db_read_char();
Index: ddb/db_macro.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_macro.c,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 db_macro.c
--- ddb/db_macro.c	8 Nov 2006 01:45:43 -0000	1.2.2.2
+++ ddb/db_macro.c	15 Nov 2006 17:15:52 -0000
@@ -33,7 +33,9 @@
 #include <ddb/db_lex.h>
 #include <ddb/db_variables.h>
 #include <ddb/db_command.h>
-
+#include <ddb/db_examine.h>
+#include <ddb/db_expr.h>
+#include <ddb/db_output.h>
 
 
 /*
@@ -73,7 +75,7 @@ void
 db_def_macro_cmd()
 {
 	register char *p;
-	register c;
+	register int c;
 	register struct db_user_macro *mp, *ep;
 
 	if (db_read_token() != tIDENT) {
@@ -141,7 +143,7 @@ db_exec_macro(name)
 	char *name;
 {
 	register struct db_user_macro *mp;
-	register n;
+	register int n;
 
 	if ((mp = db_lookup_macro(name)) == 0)
 	    return(-1);
Index: ddb/db_macro.h
===================================================================
RCS file: ddb/db_macro.h
diff -N ddb/db_macro.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ddb/db_macro.h	15 Nov 2006 17:15:52 -0000
@@ -0,0 +1,46 @@
+/*
+ *
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *	Author: Barry deFreese.
+ */
+/*
+ *
+ *
+ */
+
+#ifndef _DDB_DB_MACRO_H_
+#define _DDB_DB_MACRO_H_
+
+#include <sys/types.h>
+#include <ddb/db_variables.h>
+
+extern void db_def_macro_cmd(void);
+
+extern void db_del_macro_cmd(void);
+
+extern void db_show_macro(void);
+
+extern int db_exec_macro(char *name);
+
+extern int db_arg_variable(
+	struct db_variable *vp,
+	db_expr_t *valuep,
+	int flag,
+	db_var_aux_param_t ap);
+
+#endif /* _DDB_DB_MACRO_H_ */
Index: ddb/db_output.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_output.c,v
retrieving revision 1.3.2.3
diff -u -p -r1.3.2.3 db_output.c
--- ddb/db_output.c	9 Nov 2006 23:33:44 -0000	1.3.2.3
+++ ddb/db_output.c	15 Nov 2006 17:15:52 -0000
@@ -38,6 +38,7 @@
 #include <stdarg.h>
 #include <mach/boolean.h>
 #include <machine/db_machdep.h>
+#include <ddb/db_command.h>
 #include <ddb/db_lex.h>
 #include <ddb/db_output.h>
 
Index: ddb/db_output.h
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_output.h,v
retrieving revision 1.2
diff -u -p -r1.2 db_output.h
--- ddb/db_output.h	23 Jul 2000 00:34:12 -0000	1.2
+++ ddb/db_output.h	15 Nov 2006 17:15:52 -0000
@@ -36,5 +36,5 @@ extern void	db_force_whitespace();
 extern int	db_print_position();
 extern void	db_end_line();
 extern void	db_printf( const char *fmt, ...);
-
+extern void db_putchar(int c);
 
Index: ddb/db_print.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_print.c,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 db_print.c
--- ddb/db_print.c	8 Nov 2006 01:45:43 -0000	1.2.2.2
+++ ddb/db_print.c	15 Nov 2006 17:15:52 -0000
@@ -41,9 +41,12 @@
 #include <ipc/ipc_port.h>
 #include <ipc/ipc_space.h>
 
+#include <machine/db_interface.h>
 #include <machine/db_machdep.h>
 #include <machine/thread.h>
 
+#include <ddb/db_command.h>
+#include <ddb/db_output.h>
 #include <ddb/db_lex.h>
 #include <ddb/db_variables.h>
 #include <ddb/db_sym.h>
@@ -63,7 +66,7 @@ db_show_regs(addr, have_addr, count, mod
 	db_expr_t	value;
 	db_addr_t	offset;
 	char *		name;
-	register	i;
+	register	int i;
 	struct db_var_aux_param aux_param;
 	task_t		task = TASK_NULL;
 
Index: ddb/db_run.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_run.c,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 db_run.c
--- ddb/db_run.c	15 Oct 2006 14:59:03 -0000	1.2.2.1
+++ ddb/db_run.c	15 Nov 2006 17:15:52 -0000
@@ -41,6 +41,10 @@
 #include <ddb/db_access.h>
 #include <ddb/db_run.h>
 #include <ddb/db_task_thread.h>
+#include <ddb/db_command.h>
+#include <ddb/db_examine.h>
+#include <ddb/db_output.h>
+#include <ddb/db_watch.h>
 
 int	db_run_mode;
 
Index: ddb/db_run.h
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_run.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 db_run.h
--- ddb/db_run.h	25 Feb 1997 21:28:12 -0000	1.1.1.1
+++ ddb/db_run.h	15 Nov 2006 17:15:52 -0000
@@ -24,6 +24,9 @@
  * the rights to redistribute these changes.
  */
 
+#include <kern/task.h>
+#include <machine/db_machdep.h>
+
 extern int db_run_mode;
 
 /* modes the system may be running in */
@@ -35,3 +38,13 @@ extern int db_run_mode;
 #define	STEP_CONTINUE	4
 #define STEP_INVISIBLE	5
 #define	STEP_COUNT	6
+
+extern void db_single_step(db_regs_t *regs, task_t task);
+
+extern void db_single_step_cmd(
+	db_expr_t	addr,
+	int			have_addr,
+	db_expr_t	count,
+	char		*modif);
+
+extern boolean_t db_in_single_step(void);
Index: ddb/db_sym.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_sym.c,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 db_sym.c
--- ddb/db_sym.c	8 Nov 2006 01:45:43 -0000	1.2.2.2
+++ ddb/db_sym.c	15 Nov 2006 17:15:53 -0000
@@ -33,6 +33,8 @@
 #include <string.h>
 #include <mach/std_types.h>
 #include <machine/db_machdep.h>
+#include <ddb/db_command.h>
+#include <ddb/db_output.h>
 #include <ddb/db_sym.h>
 #include <ddb/db_task_thread.h>
 
@@ -194,7 +196,7 @@ db_sym_parse_and_lookup(func, symtab, sy
 	char		*symstr;
 {
 	register 	char *p;
-	register 	n;
+	register 	int n;
 	int	 	n_name;
 	int	 	line_number;
 	char	 	*file_name = 0;
Index: ddb/db_sym.h
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_sym.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 db_sym.h
--- ddb/db_sym.h	25 Feb 1997 21:28:12 -0000	1.1.1.1
+++ ddb/db_sym.h	15 Nov 2006 17:15:53 -0000
@@ -198,3 +198,10 @@ extern struct db_sym_switch {
 #define	X_db_search_symbol(s,o,t,d)	x_db[(s)->type].search_symbol(s,o,t,d)
 #define	X_db_line_at_pc(s,p,f,l,a)	x_db[(s)->type].line_at_pc(s,p,f,l,a)
 #define	X_db_symbol_values(s,p,n,v)	x_db[(s)->type].symbol_values(p,n,v)
+
+extern boolean_t db_line_at_pc(
+	db_sym_t sym,
+	char **filename,
+	int *linenum,
+	db_expr_t pc);
+
Index: ddb/db_task_thread.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_task_thread.c,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 db_task_thread.c
--- ddb/db_task_thread.c	15 Oct 2006 14:59:03 -0000	1.2.2.1
+++ ddb/db_task_thread.c	15 Nov 2006 17:15:53 -0000
@@ -27,6 +27,10 @@
 #if MACH_KDB
 
 #include <machine/db_machdep.h>
+#include <ddb/db_command.h>
+#include <ddb/db_expr.h>
+#include <ddb/db_lex.h>
+#include <ddb/db_output.h>
 #include <ddb/db_task_thread.h>
 #include <ddb/db_variables.h>
 
@@ -51,9 +55,9 @@ db_lookup_task(target_task)
 	task_t target_task;
 {
 	register task_t task;
-	register task_id;
+	register int task_id;
 	register processor_set_t pset;
-	register npset = 0;
+	register int npset = 0;
 
 	task_id = 0;
 	if (queue_first(&all_psets) == 0)
@@ -82,7 +86,7 @@ db_lookup_task_thread(task, target_threa
 	thread_t target_thread;
 {
 	register thread_t thread;
-	register thread_id;
+	register int thread_id;
 
 	thread_id = 0;
 	if (queue_first(&task->thread_list) == 0)
@@ -104,11 +108,11 @@ int
 db_lookup_thread(target_thread)
 	thread_t target_thread;
 {
-	register thread_id;
+	register int thread_id;
 	register task_t task;
 	register processor_set_t pset;
-	register ntask = 0;
-	register npset = 0;
+	register int ntask = 0;
+	register int npset = 0;
 
 	if (queue_first(&all_psets) == 0)
 	    return(-1);
@@ -150,11 +154,11 @@ db_check_thread_address_valid(thread)
  */
 task_t
 db_lookup_task_id(task_id)
-	register task_id;
+	register int task_id;
 {
 	register task_t task;
 	register processor_set_t pset;
-	register npset = 0;
+	register int npset = 0;
 
 	if (task_id > DB_MAX_TASKID)
 	    return(TASK_NULL);
@@ -179,7 +183,7 @@ db_lookup_task_id(task_id)
 static thread_t
 db_lookup_thread_id(task, thread_id)
 	task_t	 task;
-	register thread_id;
+	register int thread_id;
 {
 	register thread_t thread;
 
Index: ddb/db_trap.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_trap.c,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 db_trap.c
--- ddb/db_trap.c	15 Oct 2006 14:59:03 -0000	1.2.2.1
+++ ddb/db_trap.c	15 Nov 2006 17:15:53 -0000
@@ -38,6 +38,8 @@
 #include <ddb/db_command.h>
 #include <ddb/db_access.h>
 #include <ddb/db_break.h>
+#include <ddb/db_examine.h>
+#include <ddb/db_output.h>
 #include <ddb/db_task_thread.h>
 
 
Index: ddb/db_trap.h
===================================================================
RCS file: ddb/db_trap.h
diff -N ddb/db_trap.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ddb/db_trap.h	15 Nov 2006 17:15:53 -0000
@@ -0,0 +1,39 @@
+/*
+ *
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *	Author: Barry deFreese.
+ */
+/*
+ *
+ *
+ */
+
+#ifndef _DDB_DB_TRAP_H_
+#define _DDB_DB_TRAP_H_
+
+#include <sys/types.h>
+#include <machine/db_machdep.h>
+
+extern void db_task_trap(
+	int 		type,
+	int 		code,
+	boolean_t 	user_space);
+
+extern void db_trap(int type, int code);
+
+#endif /* _DDB_DB_TRAP_H_ */
Index: ddb/db_variables.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_variables.c,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 db_variables.c
--- ddb/db_variables.c	15 Oct 2006 14:59:03 -0000	1.2.2.1
+++ ddb/db_variables.c	15 Nov 2006 17:15:53 -0000
@@ -32,7 +32,11 @@
 
 #include <machine/db_machdep.h>
 
+#include <ddb/db_command.h>
+#include <ddb/db_examine.h>
+#include <ddb/db_expr.h>
 #include <ddb/db_lex.h>
+#include <ddb/db_output.h>
 #include <ddb/db_variables.h>
 #include <ddb/db_task_thread.h>
 
@@ -71,7 +75,7 @@ db_get_suffix(suffix, suffix_value)
 	register char	*suffix;
 	short		*suffix_value;
 {
-	register value;
+	register int value;
 
 	for (value = 0; *suffix && *suffix != '.' && *suffix != ':'; suffix++) {
 	    if (*suffix < '0' || *suffix > '9')
@@ -91,7 +95,7 @@ db_cmp_variable_name(vp, name, ap)
 	register db_var_aux_param_t	ap;
 {
 	register char *var_np, *np;
-	register level;
+	register int level;
 
 	for (np = name, var_np = vp->name; *var_np; ) {
 	    if (*np++ != *var_np++)
Index: ddb/db_variables.h
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_variables.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 db_variables.h
--- ddb/db_variables.h	25 Feb 1997 21:28:13 -0000	1.1.1.1
+++ ddb/db_variables.h	15 Nov 2006 17:15:53 -0000
@@ -75,4 +75,6 @@ extern struct db_variable	*db_evars;
 extern struct db_variable	db_regs[];	/* machine registers */
 extern struct db_variable	*db_eregs;
 
+extern int db_get_variable(db_expr_t *valuep);
+
 #endif	/* _DB_VARIABLES_H_ */
Index: ddb/db_watch.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_watch.c,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 db_watch.c
--- ddb/db_watch.c	15 Oct 2006 14:59:03 -0000	1.2.2.1
+++ ddb/db_watch.c	15 Nov 2006 17:15:53 -0000
@@ -37,9 +37,13 @@
 #include <vm/vm_map.h>
 
 #include <machine/db_machdep.h>
+#include <ddb/db_command.h>
 #include <ddb/db_lex.h>
 #include <ddb/db_watch.h>
 #include <ddb/db_access.h>
+#include <ddb/db_expr.h>
+#include <ddb/db_output.h>
+#include <ddb/db_run.h>
 #include <ddb/db_sym.h>
 #include <ddb/db_task_thread.h>
 
Index: ddb/db_write_cmd.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ddb/Attic/db_write_cmd.c,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 db_write_cmd.c
--- ddb/db_write_cmd.c	15 Oct 2006 14:59:03 -0000	1.2.2.1
+++ ddb/db_write_cmd.c	15 Nov 2006 17:15:53 -0000
@@ -39,6 +39,8 @@
 #include <ddb/db_lex.h>
 #include <ddb/db_access.h>
 #include <ddb/db_command.h>
+#include <ddb/db_expr.h>
+#include <ddb/db_output.h>
 #include <ddb/db_sym.h>
 #include <ddb/db_task_thread.h>
 
Index: i386/i386/db_interface.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/i386/i386/Attic/db_interface.c,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 db_interface.c
--- i386/i386/db_interface.c	5 Nov 2006 19:55:48 -0000	1.2.2.2
+++ i386/i386/db_interface.c	15 Nov 2006 17:15:57 -0000
@@ -45,9 +45,15 @@
 #include "vm_param.h"
 #include <vm/vm_map.h>
 #include <kern/cpu_number.h>
+#include <kern/printf.h>
 #include <kern/thread.h>
 #include <kern/task.h>
+#include <ddb/db_access.h>
+#include <ddb/db_command.h>
+#include <ddb/db_output.h>
+#include <ddb/db_run.h>
 #include <ddb/db_task_thread.h>
+#include <ddb/db_trap.h>
 #include <machine/machspl.h>
 
 struct	 i386_saved_state *i386_last_saved_statep;
@@ -59,6 +65,7 @@ extern	thread_t db_default_thread;
 /*
  * Print trap reason.
  */
+void
 kdbprinttrap(type, code)
 	int	type, code;
 {
@@ -258,7 +265,7 @@ int
 db_user_to_kernel_address(
 	task_t		task,
 	vm_offset_t	addr,
-	unsigned	*kaddr,
+	unsigned int	*kaddr,
 	int		flag)
 {
 	register pt_entry_t *ptp;
@@ -518,7 +525,7 @@ db_task_name(
 	task_t		task)
 {
 	register char *p;
-	register n;
+	register int n;
 	unsigned vaddr, kaddr;
 
 	vaddr = DB_USER_STACK_ADDR;
Index: i386/i386/db_interface.h
===================================================================
RCS file: i386/i386/db_interface.h
diff -N i386/i386/db_interface.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ i386/i386/db_interface.h	15 Nov 2006 17:15:57 -0000
@@ -0,0 +1,85 @@
+/*
+ *
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Author: Barry deFreese.
+ */
+/*
+ *
+ *
+ */
+
+#ifndef _I386_DB_INTERFACE_H_
+#define _I386_DB_INTERFACE_H_
+
+#include <sys/types.h>
+#include <kern/task.h>
+
+extern void kdbprinttrap(int type, int code);
+
+extern boolean_t kdb_trap(
+	int 	type,
+	int		code,
+	struct i386_saved_state *regs);
+
+extern void kdb_kentry(struct int_regs *int_regs);
+
+extern int db_user_to_kernel_address(
+	task_t			task,
+	vm_offset_t		addr,
+	unsigned int	*kaddr,
+	int				flag);
+
+extern void db_read_bytes(
+	vm_offset_t addr,
+	int			size,
+	char		*data,
+	task_t		task);
+
+extern void db_write_bytes(
+	vm_offset_t	addr,
+	int			size,
+	char		*data,
+	task_t		task);
+
+extern void db_write_bytes_user_space(
+	vm_offset_t	addr,
+	int			size,
+	char		*data,
+	task_t		task);
+
+extern boolean_t db_check_access(
+	vm_offset_t	addr,
+	int			size,
+	task_t		task);
+
+extern boolean_t db_phys_eq(
+	task_t		task1,
+	vm_offset_t	addr1,
+	task_t		task2,
+	vm_offset_t	addr2);
+
+extern boolean_t db_search_null(
+	task_t		task,
+	vm_offset_t	*svaddr,
+	vm_offset_t	evaddr,
+	vm_offset_t	*skaddr,
+	int			flag);
+
+extern void db_task_name(task_t task);
+
+#endif /* _I386_DB_INTERFACE_H_ */
Index: i386/i386/db_trace.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/i386/i386/Attic/db_trace.c,v
retrieving revision 1.3.2.2
diff -u -p -r1.3.2.2 db_trace.c
--- i386/i386/db_trace.c	8 Nov 2006 01:45:44 -0000	1.3.2.2
+++ i386/i386/db_trace.c	15 Nov 2006 17:15:58 -0000
@@ -124,6 +124,7 @@ db_lookup_i386_kreg(
 	return 0;
 }
 
+int
 db_i386_reg_value(
 	struct	db_variable	*vp,
 	db_expr_t		*valuep,
Index: i386/i386/trap.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/i386/i386/trap.c,v
retrieving revision 1.5.2.6
diff -u -p -r1.5.2.6 trap.c
--- i386/i386/trap.c	11 Nov 2006 00:54:05 -0000	1.5.2.6
+++ i386/i386/trap.c	15 Nov 2006 17:15:58 -0000
@@ -60,6 +60,8 @@ extern void thread_exception_return();
 extern void i386_exception();
 
 #if	MACH_KDB
+#include <ddb/db_watch.h>
+#include <ddb/db_run.h>
 boolean_t	debug_all_traps_with_kdb = FALSE;
 extern struct db_watchpoint *db_watchpoint_list;
 extern boolean_t db_watchpoints_inserted;
Index: ipc/ipc_kmsg.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/ipc/ipc_kmsg.c,v
retrieving revision 1.2.2.6
diff -u -p -r1.2.2.6 ipc_kmsg.c
--- ipc/ipc_kmsg.c	11 Nov 2006 00:54:05 -0000	1.2.2.6
+++ ipc/ipc_kmsg.c	15 Nov 2006 17:15:59 -0000
@@ -59,6 +59,10 @@
 
 #include <ipc/ipc_machdep.h>
 
+#if MACH_KDB
+#include <ddb/db_output.h>
+#endif
+
 extern int copyinmap();
 extern int copyoutmap();
 void ipc_msg_print(); /* forward */
Index: kern/lock.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/kern/lock.c,v
retrieving revision 1.1.1.1.4.4
diff -u -p -r1.1.1.1.4.4 lock.c
--- kern/lock.c	10 Nov 2006 01:22:58 -0000	1.1.1.1.4.4
+++ kern/lock.c	15 Nov 2006 17:15:59 -0000
@@ -42,6 +42,7 @@
 #include <kern/sched_prim.h>
 #if	MACH_KDB
 #include <machine/db_machdep.h>
+#include <ddb/db_output.h>
 #include <ddb/db_sym.h>
 #endif
 
