From af2b90de3fc9fe8a4a7c89f1c2f54f10b62ab6e0 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 5 May 2009 14:19:58 +0000 Subject: 2009-05-05 Michael Walle * cpu_asm.S, irq.c, rtems/score/cpu.h: Add lm32 gdb stub support. --- cpukit/score/cpu/lm32/irq.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cpukit/score/cpu/lm32/irq.c') diff --git a/cpukit/score/cpu/lm32/irq.c b/cpukit/score/cpu/lm32/irq.c index 3eb723d3d8..6580405513 100644 --- a/cpukit/score/cpu/lm32/irq.c +++ b/cpukit/score/cpu/lm32/irq.c @@ -28,11 +28,14 @@ unsigned long *_old_stack_ptr; #endif +unsigned long *_exception_stack_frame; + register unsigned long *stack_ptr asm("sp"); void __ISR_Handler(uint32_t vector, CPU_Interrupt_frame *ifr) { register uint32_t level; + _exception_stack_frame = NULL; /* Interrupts are disabled upon entry to this Handler */ @@ -77,7 +80,15 @@ void __ISR_Handler(uint32_t vector, CPU_Interrupt_frame *ifr) if ( _Context_Switch_necessary || _ISR_Signals_to_thread_executing ) { _ISR_Signals_to_thread_executing = FALSE; + + /* save off our stack frame so the context switcher can get to it */ + _exception_stack_frame = ifr; + _Thread_Dispatch(); + + /* and make sure its clear in case we didn't dispatch. if we did, its + * already cleared */ + _exception_stack_frame = NULL; } } -- cgit v1.2.3