arm: Implement CPU_Exception_frame_print()

This commit is contained in:
Sebastian Huber
2013-01-07 15:07:42 +01:00
parent 04f399dc0b
commit 2f28a03b5c
3 changed files with 40 additions and 35 deletions
-1
View File
@@ -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
@@ -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 */
@@ -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 */