summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/i386/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/cpu/i386/cpu.c')
-rw-r--r--cpukit/score/cpu/i386/cpu.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
index 46c12c5ae5..a3622d3156 100644
--- a/cpukit/score/cpu/i386/cpu.c
+++ b/cpukit/score/cpu/i386/cpu.c
@@ -85,6 +85,11 @@ void *_CPU_Thread_Idle_body( uintptr_t ignored )
return NULL;
}
+struct Frame_ {
+ struct Frame_ *up;
+ uintptr_t pc;
+};
+
void _defaultExcHandler (CPU_Exception_frame *ctx)
{
unsigned int faultAddr = 0;
@@ -119,12 +124,24 @@ void _defaultExcHandler (CPU_Exception_frame *ctx)
_CPU_Fatal_halt(faultAddr);
}
else {
+ struct Frame_ *fp = (struct Frame_*)ctx->ebp;
+ int i;
+
+ printk("Call Stack Trace of EIP:\n");
+ if ( fp ) {
+ for ( i=1; fp->up; fp=fp->up, i++ ) {
+ printk("0x%08x ",fp->pc);
+ if ( ! (i&3) )
+ printk("\n");
+ }
+ }
+ printk("\n");
/*
* OK I could probably use a simplified version but at least this
* should work.
*/
- printk(" ************ FAULTY THREAD WILL BE DELETED **************\n");
- rtems_task_delete(_Thread_Executing->Object.id);
+ printk(" ************ FAULTY THREAD WILL BE SUSPENDED **************\n");
+ rtems_task_suspend(_Thread_Executing->Object.id);
}
}