summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrahnds <rahnds@openbsd.org>1999-07-05 20:24:29 +0000
committerrahnds <rahnds@openbsd.org>1999-07-05 20:24:29 +0000
commit8220ecd33af36119764c7a33b80cd3823eeddecc (patch)
tree30199a671c61147ee4ad35006f754dd2ed49aa39
parentUse a breakpoint to cause an exception to cause the registers to be (diff)
downloadwireguard-openbsd-8220ecd33af36119764c7a33b80cd3823eeddecc.tar.xz
wireguard-openbsd-8220ecd33af36119764c7a33b80cd3823eeddecc.zip
Fix backtraces from ddb for powerpc, If addr is not specified, it will
start using the ddb_regs. If the address is specififed, start from the address.
-rw-r--r--sys/arch/powerpc/powerpc/db_trace.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/arch/powerpc/powerpc/db_trace.c b/sys/arch/powerpc/powerpc/db_trace.c
index 1326e688d6a..0bf006ef5ce 100644
--- a/sys/arch/powerpc/powerpc/db_trace.c
+++ b/sys/arch/powerpc/powerpc/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.5 1998/09/09 04:39:56 rahnds Exp $ */
+/* $OpenBSD: db_trace.c,v 1.6 1999/07/05 20:24:29 rahnds Exp $ */
/* $NetBSD: db_trace.c,v 1.15 1996/02/22 23:23:41 gwr Exp $ */
/*
@@ -125,12 +125,10 @@ db_stack_trace_cmd(addr, have_addr, count, modif)
boolean_t kernel_only = TRUE;
boolean_t trace_thread = FALSE;
- while (1) {
- addr = db_dumpframe(addr);
- if (addr == 0) {
- break;
- }
+ if (have_addr == 0){
+ addr = ddb_regs.tf.fixreg[1];
}
- for (i = count; i > 0 ; i--) {
+ while (addr != 0) {
+ addr = db_dumpframe(addr);
}
}