aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/sys-i386/registers.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/os-Linux/sys-i386/registers.c')
-rw-r--r--arch/um/os-Linux/sys-i386/registers.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c
index 1f90a2d71386..7cd0369e02b3 100644
--- a/arch/um/os-Linux/sys-i386/registers.c
+++ b/arch/um/os-Linux/sys-i386/registers.c
@@ -130,11 +130,14 @@ void get_safe_registers(unsigned long *regs, unsigned long *fp_regs)
130 HOST_FP_SIZE * sizeof(unsigned long)); 130 HOST_FP_SIZE * sizeof(unsigned long));
131} 131}
132 132
133void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer) 133unsigned long get_thread_reg(int reg, jmp_buf *buf)
134{ 134{
135 struct __jmp_buf *jmpbuf = buffer; 135 switch(reg){
136 136 case EIP: return buf[0]->__eip;
137 UPT_SET(uml_regs, EIP, jmpbuf->__eip); 137 case UESP: return buf[0]->__esp;
138 UPT_SET(uml_regs, UESP, jmpbuf->__esp); 138 case EBP: return buf[0]->__ebp;
139 UPT_SET(uml_regs, EBP, jmpbuf->__ebp); 139 default:
140 printk("get_thread_regs - unknown register %d\n", reg);
141 return 0;
142 }
140} 143}