[PATCH] score/i386: Add context switch restore external symbol as a marker.
Chris Johns
chrisj at rtems.org
Fri Jul 22 01:17:53 UTC 2016
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
More information about the devel
mailing list