summaryrefslogtreecommitdiff
path: root/sys/arch/sh
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-06-22 21:02:12 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-06-22 21:02:12 +0000
commit8af57fdf574da8b61433ede4ae2b3b17f6d9cb5c (patch)
tree8742b7bffbc7c2d2956e3e6d14683f93c3632946 /sys/arch/sh
parent59be0deb6c8aa359e4c31003703d97b85e6e3e94 (diff)
Like alpha, db_stack_dump() on mips and sh needs complete frame information
and can not work from a stack address only. Mention this and abort instead of printing a wrong trace. (prefer kern.splassert=3 to =2 on these platforms)
Diffstat (limited to 'sys/arch/sh')
-rw-r--r--sys/arch/sh/sh/db_trace.c7
1 files changed, 6 insertions, 1 deletions
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;