summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-01-07 13:42:09 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-01-07 15:07:42 +0100
commit2f28a03b5c0e8d29b3f3427cc62f35b32103901c (patch)
treefc726fb1ac037e13850f422470c8300e81583c4a
parentarm: Add and use _ARMV7M_Exception_default() (diff)
downloadrtems-2f28a03b5c0e8d29b3f3427cc62f35b32103901c.tar.bz2
arm: Implement CPU_Exception_frame_print()
-rw-r--r--cpukit/score/cpu/arm/Makefile.am1
-rw-r--r--cpukit/score/cpu/arm/arm-exception-frame-print.c46
-rw-r--r--cpukit/score/cpu/arm/armv7m-exception-frame-print.c28
3 files changed, 40 insertions, 35 deletions
diff --git a/cpukit/score/cpu/arm/Makefile.am b/cpukit/score/cpu/arm/Makefile.am
index dedbb049b4..56a5fdd465 100644
--- a/cpukit/score/cpu/arm/Makefile.am
+++ b/cpukit/score/cpu/arm/Makefile.am
@@ -26,7 +26,6 @@ libscorecpu_a_SOURCES += armv7m-context-initialize.c
libscorecpu_a_SOURCES += armv7m-context-restore.c
libscorecpu_a_SOURCES += armv7m-context-switch.c
libscorecpu_a_SOURCES += armv7m-exception-default.c
-libscorecpu_a_SOURCES += armv7m-exception-frame-print.c
libscorecpu_a_SOURCES += armv7m-exception-handler-get.c
libscorecpu_a_SOURCES += armv7m-exception-handler-set.c
libscorecpu_a_SOURCES += armv7m-exception-priority-get.c
diff --git a/cpukit/score/cpu/arm/arm-exception-frame-print.c b/cpukit/score/cpu/arm/arm-exception-frame-print.c
index 4d89f69f76..53d31adb73 100644
--- a/cpukit/score/cpu/arm/arm-exception-frame-print.c
+++ b/cpukit/score/cpu/arm/arm-exception-frame-print.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012-2013 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Obere Lagerstr. 30
@@ -17,12 +17,46 @@
#endif
#include <rtems/score/cpu.h>
-
-#ifdef ARM_MULTILIB_ARCH_V4
+#include <rtems/bspIo.h>
void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
{
- /* TODO */
+ printk(
+ "\n"
+ "R0 = 0x%08x R8 = 0x%08x\n"
+ "R1 = 0x%08x R9 = 0x%08x\n"
+ "R2 = 0x%08x R10 = 0x%08x\n"
+ "R3 = 0x%08x R11 = 0x%08x\n"
+ "R4 = 0x%08x R12 = 0x%08x\n"
+ "R5 = 0x%08x SP = 0x%08x\n"
+ "R6 = 0x%08x LR = 0x%08x\n"
+ "R7 = 0x%08x PC = 0x%08x\n"
+#if defined(ARM_MULTILIB_ARCH_V4)
+ "CPSR = 0x%08x VEC = 0x%08x\n",
+#elif defined(ARM_MULTILIB_ARCH_V7M)
+ "XPSR = 0x%08x VEC = 0x%08x\n",
+#endif
+ frame->register_r0,
+ frame->register_r1,
+ frame->register_r2,
+ frame->register_r3,
+ frame->register_r4,
+ frame->register_r5,
+ frame->register_r6,
+ frame->register_r7,
+ frame->register_r8,
+ frame->register_r9,
+ frame->register_r10,
+ frame->register_r11,
+ frame->register_r12,
+ frame->register_sp,
+ frame->register_lr,
+ frame->register_pc,
+#if defined(ARM_MULTILIB_ARCH_V4)
+ frame->register_cpsr,
+#elif defined(ARM_MULTILIB_ARCH_V7M)
+ frame->register_xpsr,
+#endif
+ frame->vector
+ );
}
-
-#endif /* ARM_MULTILIB_ARCH_V4 */
diff --git a/cpukit/score/cpu/arm/armv7m-exception-frame-print.c b/cpukit/score/cpu/arm/armv7m-exception-frame-print.c
deleted file mode 100644
index 86931b2b24..0000000000
--- a/cpukit/score/cpu/arm/armv7m-exception-frame-print.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
-
-#ifdef HAVE_CONFIG_H
- #include "config.h"
-#endif
-
-#include <rtems/score/cpu.h>
-
-#ifdef ARM_MULTILIB_ARCH_V7M
-
-void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
-{
- /* TODO */
-}
-
-#endif /* ARM_MULTILIB_ARCH_V7M */