summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrahnds <rahnds@openbsd.org>1999-07-05 20:29:14 +0000
committerrahnds <rahnds@openbsd.org>1999-07-05 20:29:14 +0000
commit3f1f549ecabb7c95825f4a3d30adabd3522d33c9 (patch)
treef9145d5546154b1e99273534a0889be9c6ea066e
parentFix backtraces from ddb for powerpc, If addr is not specified, it will (diff)
downloadwireguard-openbsd-3f1f549ecabb7c95825f4a3d30adabd3522d33c9.tar.xz
wireguard-openbsd-3f1f549ecabb7c95825f4a3d30adabd3522d33c9.zip
move some code under ifdef DDB, it uses a db_ function during the call.
It is a debugging operation anyway.
-rw-r--r--sys/arch/powerpc/powerpc/trap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c
index cdb1886a06f..894882c3851 100644
--- a/sys/arch/powerpc/powerpc/trap.c
+++ b/sys/arch/powerpc/powerpc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.14 1999/04/22 06:08:06 rahnds Exp $ */
+/* $OpenBSD: trap.c,v 1.15 1999/07/05 20:29:14 rahnds Exp $ */
/* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */
/*
@@ -57,15 +57,16 @@
volatile int want_resched;
-#ifdef PPC_WANT_BACKTRACE
-u_int32_t dumpframe(u_int32_t);
+#ifdef DDB
+u_int32_t db_dumpframe(u_int32_t);
void
ppc_dumpbt(struct trapframe *frame)
{
+ u_int32_t addr;
/* dumpframe is defined in db_trace.c */
addr=frame->fixreg[1];
while (addr != 0) {
- addr = dumpframe(addr);
+ addr = db_dumpframe(addr);
}
return;
}
@@ -163,7 +164,6 @@ printf("kern dsi on addr %x iar %x\n", frame->dar, frame->srr0);
printf("dsi on addr %x iar %x lr %x\n", frame->dar, frame->srr0,frame->lr);
/*
* keep this for later in case we want it later.
-ppc_dumpbt(frame);
*/
sv.sival_int = frame->dar;
trapsignal(p, SIGSEGV, vftype, SEGV_MAPERR, sv);