Add an external symbol as a marker to the restore point in the context switch. If you set the IP to this location for a blocked thread and you use the saved register values in the TCB you can view the thread's context. --- cpukit/score/cpu/i386/cpu_asm.S | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/cpukit/score/cpu/i386/cpu_asm.S b/cpukit/score/cpu/i386/cpu_asm.S index 45079a6..3c20fd4 100644 --- a/cpukit/score/cpu/i386/cpu_asm.S +++ b/cpukit/score/cpu/i386/cpu_asm.S @@ -43,6 +43,7 @@ .p2align 1 PUBLIC (_CPU_Context_switch) + PUBLIC (_CPU_Context_switch_Restore_Marker) .set RUNCONTEXT_ARG, 4 /* save context argument */ .set HEIRCONTEXT_ARG, 8 /* restore context argument */ @@ -75,6 +76,7 @@ SYM (_CPU_Context_switch): movb $1, I386_CONTEXT_CONTROL_IS_EXECUTING_OFFSET(eax) #endif +_CPU_Context_switch_Restore_Marker: restore: pushl REG_EFLAGS(eax) /* push eflags */ popf /* restore eflags */ -- 2.4.6 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel