summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
diff options
context:
space:
mode:
authorDale S. Rahn <rahnds@cvs.openbsd.org>1999-07-05 20:24:30 +0000
committerDale S. Rahn <rahnds@cvs.openbsd.org>1999-07-05 20:24:30 +0000
commit6dd1c11ff60b8e5e973956cac0d4278f0d65aa54 (patch)
treee41cebaba16d5b312b07a5779e2ee52608c09d59 /sys/arch/powerpc
parent0ef8e22b32eb5d4ab040dd34ff15ff524578132d (diff)
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.
Diffstat (limited to 'sys/arch/powerpc')
-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);
}
}