summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc/include/db_machdep.h
diff options
context:
space:
mode:
authorDale S. Rahn <rahnds@cvs.openbsd.org>1998-08-22 17:54:30 +0000
committerDale S. Rahn <rahnds@cvs.openbsd.org>1998-08-22 17:54:30 +0000
commitb285f1e4b5aef4f8c39247bdba4ebe653cf550ee (patch)
treeca5ea7916f0645f415cb754f11c3645327670441 /sys/arch/powerpc/include/db_machdep.h
parentc851e856eca19d9eeb6478bec30ba026c378295e (diff)
Changes to get a at least mostly working kernel debugger.
Need to get symbol support in the loader too.
Diffstat (limited to 'sys/arch/powerpc/include/db_machdep.h')
-rw-r--r--sys/arch/powerpc/include/db_machdep.h46
1 files changed, 6 insertions, 40 deletions
diff --git a/sys/arch/powerpc/include/db_machdep.h b/sys/arch/powerpc/include/db_machdep.h
index a653426ce6f..ffb22e9e9c0 100644
--- a/sys/arch/powerpc/include/db_machdep.h
+++ b/sys/arch/powerpc/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.5 1998/04/06 20:22:23 pefo Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.6 1998/08/22 17:54:29 rahnds Exp $ */
/* $NetBSD: db_machdep.h,v 1.13 1996/04/29 20:50:08 leo Exp $ */
/*
@@ -41,58 +41,24 @@
typedef vm_offset_t db_addr_t; /* address - unsigned */
typedef int db_expr_t; /* expression - signed */
struct powerpc_saved_state {
- u_int32_t r0; /* data registers */
- u_int32_t r1;
- u_int32_t r2;
- u_int32_t r3;
- u_int32_t r4;
- u_int32_t r5;
- u_int32_t r6;
- u_int32_t r7;
- u_int32_t r8;
- u_int32_t r9;
- u_int32_t r10;
- u_int32_t r11;
- u_int32_t r12;
- u_int32_t r13;
- u_int32_t r14;
- u_int32_t r15;
- u_int32_t r16;
- u_int32_t r17;
- u_int32_t r18;
- u_int32_t r19;
- u_int32_t r20;
- u_int32_t r21;
- u_int32_t r22;
- u_int32_t r23;
- u_int32_t r24;
- u_int32_t r25;
- u_int32_t r26;
- u_int32_t r27;
- u_int32_t r28;
- u_int32_t r29;
- u_int32_t r30;
- u_int32_t r31;
- u_int32_t r32;
- u_int32_t iar;
- u_int32_t msr;
+ struct trapframe tf;
};
typedef struct powerpc_saved_state db_regs_t;
db_regs_t ddb_regs; /* register state */
#define DDB_REGS (&ddb_regs)
-#define PC_REGS(regs) ((db_addr_t)(regs)->iar)
+#define PC_REGS(regs) ((regs)->tf.srr0)
#define BKPT_INST 0x7C810808 /* breakpoint instruction */
#define BKPT_SIZE (4) /* size of breakpoint inst */
#define BKPT_SET(inst) (BKPT_INST)
-#define FIXUP_PC_AFTER_BREAK(regs) ((regs)->iar -= 4)
+#define FIXUP_PC_AFTER_BREAK(regs) ((regs)->tf.srr0 -= 4)
#define SR_SINGLESTEP 0x8000
-#define db_clear_single_step(regs) ((regs)->msr &= ~SR_SINGLESTEP)
-#define db_set_single_step(regs) ((regs)->msr |= SR_SINGLESTEP)
+#define db_clear_single_step(regs) ((regs)->tf.srr1 &= ~SR_SINGLESTEP)
+#define db_set_single_step(regs) ((regs)->tf.srr1 |= SR_SINGLESTEP)
#define T_BREAKPOINT 0xffff
#define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BREAKPOINT)