Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm Add a 'mach fault' command to print DFAR/DFSR/I...
details: https://anonhg.NetBSD.org/src/rev/89d6fc372998
branches: trunk
changeset: 781670:89d6fc372998
user: matt <matt%NetBSD.org@localhost>
date: Fri Sep 21 22:12:35 2012 +0000
description:
Add a 'mach fault' command to print DFAR/DFSR/IFAR/IFSR/TTBR
diffstat:
sys/arch/arm/arm32/db_machdep.c | 16 ++++++++++++++--
sys/arch/arm/include/arm32/db_machdep.h | 3 ++-
2 files changed, 16 insertions(+), 3 deletions(-)
diffs (60 lines):
diff -r 3e23d4d7b581 -r 89d6fc372998 sys/arch/arm/arm32/db_machdep.c
--- a/sys/arch/arm/arm32/db_machdep.c Fri Sep 21 16:38:54 2012 +0000
+++ b/sys/arch/arm/arm32/db_machdep.c Fri Sep 21 22:12:35 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.14 2012/08/31 11:52:39 skrll Exp $ */
+/* $NetBSD: db_machdep.c,v 1.15 2012/09/21 22:12:35 matt Exp $ */
/*
* Copyright (c) 1996 Mark Brinicombe
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.14 2012/08/31 11:52:39 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.15 2012/09/21 22:12:35 matt Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -91,6 +91,9 @@
{ DDB_ADD_CMD("panic", db_show_panic_cmd, 0,
"Displays the last panic string",
NULL,NULL) },
+ { DDB_ADD_CMD("fault", db_show_fault_cmd, 0,
+ "Displays the fault registers",
+ NULL,NULL) },
#endif
#ifdef ARM32_DB_COMMANDS
ARM32_DB_COMMANDS,
@@ -135,6 +138,15 @@
db_printf("Panic string: %s\n", panicstr);
(void)splx(s);
}
+
+void
+db_show_fault_cmd(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
+{
+ db_printf("DFAR=%#x DFSR=%#x IFAR=%#x IFSR=%#x TTBR=%#x\n",
+ armreg_dfar_read(), armreg_dfsr_read(),
+ armreg_ifar_read(), armreg_ifsr_read(),
+ armreg_ttbr_read());
+}
#endif
diff -r 3e23d4d7b581 -r 89d6fc372998 sys/arch/arm/include/arm32/db_machdep.h
--- a/sys/arch/arm/include/arm32/db_machdep.h Fri Sep 21 16:38:54 2012 +0000
+++ b/sys/arch/arm/include/arm32/db_machdep.h Fri Sep 21 22:12:35 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.5 2009/03/14 14:45:55 dsl Exp $ */
+/* $NetBSD: db_machdep.h,v 1.6 2012/09/21 22:12:36 matt Exp $ */
#ifndef _ARM32_DB_MACHDEP_H_
#define _ARM32_DB_MACHDEP_H_
@@ -7,5 +7,6 @@
void db_show_panic_cmd(db_expr_t, bool, db_expr_t, const char *);
void db_show_frame_cmd(db_expr_t, bool, db_expr_t, const char *);
+void db_show_fault_cmd(db_expr_t, bool, db_expr_t, const char *);
#endif
Home |
Main Index |
Thread Index |
Old Index