summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2005-11-13 17:50:46 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2005-11-13 17:50:46 +0000
commitac3032870b4893e133da625a13872a42dd2be14d (patch)
tree36666bbd4d862ebfa842f3ab1c7f8ddc1f451d71 /sys/arch/i386
parent56fd7dfee4de7122306fde7e9dc0075dee5e3dae (diff)
move kgdb_connect and kgdb_panic into MI. looked by miod@ and kettenis@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/kgdb_machdep.c38
-rw-r--r--sys/arch/i386/include/db_machdep.h4
2 files changed, 4 insertions, 38 deletions
diff --git a/sys/arch/i386/i386/kgdb_machdep.c b/sys/arch/i386/i386/kgdb_machdep.c
index 3e926ecf4f4..a7cf21cacad 100644
--- a/sys/arch/i386/i386/kgdb_machdep.c
+++ b/sys/arch/i386/i386/kgdb_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kgdb_machdep.c,v 1.3 2004/07/02 16:29:55 niklas Exp $ */
+/* $OpenBSD: kgdb_machdep.c,v 1.4 2005/11/13 17:50:44 fgsch Exp $ */
/* $NetBSD: kgdb_machdep.c,v 1.6 1998/08/13 21:36:03 thorpej Exp $ */
/*-
@@ -224,39 +224,3 @@ kgdb_setregs(regs, gdb_regs)
regs->tf_ss = gdb_regs[11];
}
}
-
-/*
- * Trap into kgdb to wait for debugger to connect,
- * noting on the console why nothing else is going on.
- */
-void
-kgdb_connect(verbose)
- int verbose;
-{
-
- if (kgdb_dev < 0)
- return;
-
- if (verbose)
- printf("kgdb waiting...");
-
- breakpoint();
-
- if (verbose)
- printf("connected.\n");
-
- kgdb_debug_panic = 1;
-}
-
-/*
- * Decide what to do on panic.
- * (This is called by panic, like Debugger())
- */
-void
-kgdb_panic()
-{
- if (kgdb_dev >= 0 && kgdb_debug_panic) {
- printf("entering kgdb\n");
- kgdb_connect(kgdb_active == 0);
- }
-}
diff --git a/sys/arch/i386/include/db_machdep.h b/sys/arch/i386/include/db_machdep.h
index ac49fe52e91..20faad339cd 100644
--- a/sys/arch/i386/include/db_machdep.h
+++ b/sys/arch/i386/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.14 2005/01/04 21:14:35 espie Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.15 2005/11/13 17:50:44 fgsch Exp $ */
/* $NetBSD: db_machdep.h,v 1.9 1996/05/03 19:23:59 christos Exp $ */
/*
@@ -110,6 +110,8 @@ typedef long kgdb_reg_t;
#define KGDB_NUMREGS 16
#define KGDB_BUFLEN 512
+#define KGDB_ENTER breakpoint()
+
#if 0
void db_task_name(/* task_t */);
#endif