summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale S. Rahn <rahnds@cvs.openbsd.org>1998-09-09 04:54:44 +0000
committerDale S. Rahn <rahnds@cvs.openbsd.org>1998-09-09 04:54:44 +0000
commit285cc353e4924e8bbb01662904bf4ec7edbfedd4 (patch)
tree1a4cbaa6d0b5f71b3f3d56e0dd0ffe3ecd244eb0
parentaf0007396fc4d0e9d9fb3d698f04a97cefe444b8 (diff)
Weak version of support for ddb breakpoints. Works, but not fully
implemented.
-rw-r--r--sys/arch/powerpc/powerpc/trap.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c
index 33edbad7d73..f0e3dd9b28a 100644
--- a/sys/arch/powerpc/powerpc/trap.c
+++ b/sys/arch/powerpc/powerpc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.11 1998/08/25 08:02:23 pefo Exp $ */
+/* $OpenBSD: trap.c,v 1.12 1998/09/09 04:54:43 rahnds Exp $ */
/* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */
/*
@@ -328,10 +328,27 @@ printf("pgm iar %x\n", frame->srr0);
}
if (frame->srr1 && (1<<14)) {
/* trap instruction exception */
+ /*
+ instr = copyin (srr0)
+ if (instr == BKPT_INST && uid == 0) {
+ db_trap(T_BREAKPOINT?)
+ break;
+ }
+ */
}
sv.sival_int = frame->srr0;
trapsignal(p, SIGILL, 0, ILL_ILLOPC, sv);
break;
+ case EXC_PGM:
+ /* should check for correct byte here or panic */
+#ifdef DDB
+ db_save_regs(frame);
+ db_trap(T_BREAKPOINT);
+#else
+ panic("trap");
+#endif
+ break;
+
case EXC_AST|EXC_USER:
/* This is just here that we trap */
break;