summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/mips64/mips64/db_machdep.c7
-rw-r--r--sys/arch/sh/sh/db_trace.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/arch/mips64/mips64/db_machdep.c b/sys/arch/mips64/mips64/db_machdep.c
index 245a5808b31..f84585025a0 100644
--- a/sys/arch/mips64/mips64/db_machdep.c
+++ b/sys/arch/mips64/mips64/db_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.c,v 1.16 2008/02/29 19:00:39 miod Exp $ */
+/* $OpenBSD: db_machdep.c,v 1.17 2008/06/22 21:02:10 miod Exp $ */
/*
* Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se)
@@ -224,6 +224,11 @@ db_stack_trace_print(addr, have_addr, count, modif, pr)
extern char k_general[];
struct trap_frame *regs = &ddb_regs;
+ if (have_addr) {
+ (*pr)("mips trace requires a trap frame... giving up\n");
+ return;
+ }
+
/* get initial values from the exception frame */
sp = (vaddr_t)regs->sp;
pc = (vaddr_t)regs->pc;
diff --git a/sys/arch/sh/sh/db_trace.c b/sys/arch/sh/sh/db_trace.c
index 5e01584a975..311b6161e48 100644
--- a/sys/arch/sh/sh/db_trace.c
+++ b/sys/arch/sh/sh/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.4 2007/03/17 20:23:05 miod Exp $ */
+/* $OpenBSD: db_trace.c,v 1.5 2008/06/22 21:02:11 miod Exp $ */
/* $NetBSD: db_trace.c,v 1.19 2006/01/21 22:10:59 uwe Exp $ */
/*-
@@ -81,6 +81,11 @@ db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count,
db_addr_t callpc, frame, lastframe;
uint32_t vbr;
+ if (have_addr) {
+ (*print)("sh trace requires a trap frame... giving up\n");
+ return;
+ }
+
__asm volatile("stc vbr, %0" : "=r"(vbr));
frame = ddb_regs.tf_r14;