Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 On a fatal fault, dump the trapframe's co...
details: https://anonhg.NetBSD.org/src/rev/a52ecacc5b00
branches: trunk
changeset: 555484:a52ecacc5b00
user: scw <scw%NetBSD.org@localhost>
date: Tue Nov 18 22:39:05 2003 +0000
description:
On a fatal fault, dump the trapframe's contents to the console.
This is useful when DDB is not available, or practical.
diffstat:
sys/arch/arm/arm32/fault.c | 32 +++++++++++++++++++++++++-------
1 files changed, 25 insertions(+), 7 deletions(-)
diffs (58 lines):
diff -r 386263afc1de -r a52ecacc5b00 sys/arch/arm/arm32/fault.c
--- a/sys/arch/arm/arm32/fault.c Tue Nov 18 21:40:13 2003 +0000
+++ b/sys/arch/arm/arm32/fault.c Tue Nov 18 22:39:05 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fault.c,v 1.43 2003/11/15 20:18:34 scw Exp $ */
+/* $NetBSD: fault.c,v 1.44 2003/11/18 22:39:05 scw Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
#include "opt_kgdb.h"
#include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.43 2003/11/15 20:18:34 scw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.44 2003/11/18 22:39:05 scw Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -476,16 +476,34 @@
if (l != NULL) {
printf("Fatal %s mode data abort: '%s'\n", mode,
data_aborts[fsr & FAULT_TYPE_MASK].desc);
- printf("\ttrapframe: %p, PC: 0x%08x, ", tf, tf->tf_pc);
+ printf("trapframe: %p\nFSR=%08x, FAR=", tf, fsr);
if ((fsr & FAULT_IMPRECISE) == 0)
- printf("FSR: 0x%x, FAR: 0x%08x\n", fsr, far);
+ printf("%08x, ", far);
else
- printf("Imprecise fault. FSR/FAR invalid\n");
+ printf("Invalid, ");
+ printf("spsr=%08x\n", tf->tf_spsr);
} else {
- printf("Fatal %s mode prefetch abort\n", mode);
- printf("\ttrapframe: %p, PC: 0x%08x\n", tf, tf->tf_pc);
+ printf("Fatal %s mode prefetch abort at 0x%08x\n",
+ mode, tf->tf_pc);
+ printf("trapframe: %p, spsr=%08x\n", tf, tf->tf_spsr);
}
+ printf("r0 =%08x, r1 =%08x, r2 =%08x, r3 =%08x\n",
+ tf->tf_r0, tf->tf_r1, tf->tf_r2, tf->tf_r3);
+ printf("r4 =%08x, r5 =%08x, r6 =%08x, r7 =%08x\n",
+ tf->tf_r4, tf->tf_r5, tf->tf_r6, tf->tf_r7);
+ printf("r8 =%08x, r9 =%08x, r10=%08x, r11=%08x\n",
+ tf->tf_r8, tf->tf_r9, tf->tf_r10, tf->tf_r11);
+ printf("r12=%08x, ", tf->tf_r12);
+
+ if (TRAP_USERMODE(tf))
+ printf("usp=%08x, ulr=%08x",
+ tf->tf_usr_sp, tf->tf_usr_lr);
+ else
+ printf("ssp=%08x, slr=%08x",
+ tf->tf_svc_sp, tf->tf_svc_lr);
+ printf(", pc =%08x\n\n", tf->tf_pc);
+
#if defined(DDB) || defined(KGDB)
kdb_trap(T_FAULT, tf);
#endif
Home |
Main Index |
Thread Index |
Old Index