Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha - Add exception_return() to the list of...
details: https://anonhg.NetBSD.org/src/rev/fa0093e1f2d9
branches: trunk
changeset: 1014342:fa0093e1f2d9
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Sep 18 00:09:29 2020 +0000
description:
- Add exception_return() to the list of trap vector symbols, which will
enable us to trace back through an exception if the fault happens
during the exception return.
- Identify and report the kernel thread backstop when back tracing
kernel threads.
diffstat:
sys/arch/alpha/alpha/db_trace.c | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diffs (48 lines):
diff -r c56a6995269b -r fa0093e1f2d9 sys/arch/alpha/alpha/db_trace.c
--- a/sys/arch/alpha/alpha/db_trace.c Fri Sep 18 00:06:35 2020 +0000
+++ b/sys/arch/alpha/alpha/db_trace.c Fri Sep 18 00:09:29 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.28 2012/02/06 02:14:10 matt Exp $ */
+/* $NetBSD: db_trace.c,v 1.29 2020/09/18 00:09:29 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.28 2012/02/06 02:14:10 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.29 2020/09/18 00:09:29 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -85,6 +85,12 @@
{ (vaddr_t)&XentSys, "syscall" },
{ (vaddr_t)&XentUna, "unaligned access fault" },
{ (vaddr_t)&XentRestart, "console restart" },
+
+ /*
+ * We'll not know what trap we took, but we'll find the
+ * trap frame, at least...
+ */
+ { (vaddr_t)&exception_return, "(exception return)" },
{ 0 }
};
@@ -256,6 +262,16 @@
}
/*
+ * If the previous RA pointed at the kernel thread
+ * backstop, then we are at the root of the call
+ * graph.
+ */
+ if (symval == (vaddr_t)&alpha_kthread_backstop) {
+ (*pr)("--- kernel thread backstop ---\n");
+ break;
+ }
+
+ /*
* XXX Printing out arguments is Hard. We'd have to
* keep lots of state as we traverse the frame, figuring
* out where the arguments to the function are stored
Home |
Main Index |
Thread Index |
Old Index