Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/powerpc db_stack_trace_print():
details: https://anonhg.NetBSD.org/src/rev/5f137539db88
branches: trunk
changeset: 935562:5f137539db88
user: rin <rin%NetBSD.org@localhost>
date: Mon Jul 06 08:30:10 2020 +0000
description:
db_stack_trace_print():
For ibm4xx, show fault address in dear register also for EXC_DTMISS.
diffstat:
sys/arch/powerpc/powerpc/db_trace.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diffs (52 lines):
diff -r b3478abb350b -r 5f137539db88 sys/arch/powerpc/powerpc/db_trace.c
--- a/sys/arch/powerpc/powerpc/db_trace.c Mon Jul 06 08:26:10 2020 +0000
+++ b/sys/arch/powerpc/powerpc/db_trace.c Mon Jul 06 08:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.58 2018/02/28 20:11:09 mrg Exp $ */
+/* $NetBSD: db_trace.c,v 1.59 2020/07/06 08:30:10 rin Exp $ */
/* $OpenBSD: db_trace.c,v 1.3 1997/03/21 02:10:48 niklas Exp $ */
/*
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.58 2018/02/28 20:11:09 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.59 2020/07/06 08:30:10 rin Exp $");
#include "opt_ppcarch.h"
@@ -213,7 +213,9 @@
tf->tf_dar);
#endif
#ifdef PPC_IBM4XX
- (*pr)("DSI %s trap @ %#x by ",
+ trapstr = "DSI";
+dsi:
+ (*pr)("%s %s trap @ %#x by ", trapstr,
tf->tf_esr & ESR_DST ? "write" : "read",
tf->tf_dear);
#endif
@@ -241,7 +243,11 @@
case EXC_PERF: trapstr = "PERF"; break;
case EXC_SMI: trapstr = "SMI"; break;
case EXC_RST: trapstr = "RST"; break;
- case EXC_DTMISS: trapstr = "DTMISS"; break;
+ case EXC_DTMISS: trapstr = "DTMISS";
+#ifdef PPC_IBM4XX
+ goto dsi;
+#endif
+ break;
case EXC_ITMISS: trapstr = "ITMISS"; break;
case EXC_FIT: trapstr = "FIT"; break;
case EXC_PIT: trapstr = "PIT"; break;
@@ -278,7 +284,8 @@
#endif /* PPC_OEA601 */
#endif /* PPC_OEA */
#ifdef PPC_IBM4XX
- if (tf->tf_exc == EXC_DSI)
+ if (tf->tf_exc == EXC_DSI ||
+ tf->tf_exc == EXC_DTMISS)
(*pr)(" dear=%#x", tf->tf_dear);
(*pr)(" esr=%#x pid=%#x", tf->tf_esr, tf->tf_pid);
#endif
Home |
Main Index |
Thread Index |
Old Index