Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc fix single stepping and continuing from bre...
details: https://anonhg.NetBSD.org/src/rev/af877f3cb014
branches: trunk
changeset: 519794:af877f3cb014
user: dbj <dbj%NetBSD.org@localhost>
date: Thu Dec 27 10:32:23 2001 +0000
description:
fix single stepping and continuing from breakpoints in ddb
diffstat:
sys/arch/powerpc/include/db_machdep.h | 6 ++----
sys/arch/powerpc/powerpc/db_interface.c | 14 +++-----------
2 files changed, 5 insertions(+), 15 deletions(-)
diffs (60 lines):
diff -r cc5c02394cf8 -r af877f3cb014 sys/arch/powerpc/include/db_machdep.h
--- a/sys/arch/powerpc/include/db_machdep.h Thu Dec 27 10:25:41 2001 +0000
+++ b/sys/arch/powerpc/include/db_machdep.h Thu Dec 27 10:32:23 2001 +0000
@@ -1,5 +1,5 @@
/* $OpenBSD: db_machdep.h,v 1.2 1997/03/21 00:48:48 niklas Exp $ */
-/* $NetBSD: db_machdep.h,v 1.10 2001/06/20 02:40:14 briggs Exp $ */
+/* $NetBSD: db_machdep.h,v 1.11 2001/12/27 10:32:23 dbj Exp $ */
/*
* Mach Operating System
@@ -69,13 +69,11 @@
#define BKPT_SIZE (4) /* size of breakpoint inst */
#define BKPT_SET(inst) (BKPT_INST)
-#define FIXUP_PC_AFTER_BREAK(regs) ((regs)->iar -= 4)
-
#define SR_SINGLESTEP 0x400
#define db_clear_single_step(regs) ((regs)->msr &= ~SR_SINGLESTEP)
#define db_set_single_step(regs) ((regs)->msr |= SR_SINGLESTEP)
-#define T_BREAKPOINT 0xffff
+#define T_BREAKPOINT EXC_PGM /* generated by trap instruction */
#define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BREAKPOINT)
#define T_WATCHPOINT 0xeeee
diff -r cc5c02394cf8 -r af877f3cb014 sys/arch/powerpc/powerpc/db_interface.c
--- a/sys/arch/powerpc/powerpc/db_interface.c Thu Dec 27 10:25:41 2001 +0000
+++ b/sys/arch/powerpc/powerpc/db_interface.c Thu Dec 27 10:32:23 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.14 2001/12/24 16:57:40 dbj Exp $ */
+/* $NetBSD: db_interface.c,v 1.15 2001/12/27 10:32:23 dbj Exp $ */
/* $OpenBSD: db_interface.c,v 1.2 1996/12/28 06:21:50 rahnds Exp $ */
#define USERACC
@@ -60,15 +60,7 @@
&& (frame->srr1 & 0x20000))
|| frame->exc == EXC_BPT)) {
- memcpy(DDB_REGS->r, frame->fixreg, 32 * sizeof(u_int32_t));
- DDB_REGS->iar = frame->srr0;
- DDB_REGS->msr = frame->srr1;
-
- db_trap(T_BREAKPOINT, 0);
-
- memcpy(frame->fixreg, DDB_REGS->r, 32 * sizeof(u_int32_t));
-
- return 1;
+ return kdb_trap(frame->exc, frame);
}
return 0;
}
@@ -110,7 +102,7 @@
db_active++;
cnpollc(1);
- db_trap(T_BREAKPOINT, 0);
+ db_trap(type, 0);
cnpollc(0);
db_active--;
Home |
Main Index |
Thread Index |
Old Index