From 6dd1c11ff60b8e5e973956cac0d4278f0d65aa54 Mon Sep 17 00:00:00 2001 From: "Dale S. Rahn" Date: Mon, 5 Jul 1999 20:24:30 +0000 Subject: 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. --- sys/arch/powerpc/powerpc/db_trace.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sys') 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); } } -- cgit v1.2.3