With newer libcs, the JB_* macros (which we shouldn't be using anyway, 
probably) go away.  This patch defines them if setjmp.h doesn't.  It'd
be nice to have a real way to do this, as sysrq-t requires a way to
get registers from out-of-context threads, which we store in jmpbufs.

Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>

Index: linux-2.6.15/arch/um/os-Linux/sys-i386/registers.c
===================================================================
--- linux-2.6.15.orig/arch/um/os-Linux/sys-i386/registers.c     2005-10-28 
12:58:12.000000000 -0400
+++ linux-2.6.15/arch/um/os-Linux/sys-i386/registers.c  2006-02-06 
17:34:36.000000000 -0500
@@ -127,6 +127,12 @@ void get_safe_registers(unsigned long *r
        memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long));
 }
 
+#ifndef JB_PC
+#define JB_PC 5
+#define JB_SP 4
+#define JB_BP 3
+#endif
+
 void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
 {
        struct __jmp_buf_tag *jmpbuf = buffer;
Index: linux-2.6.15/arch/um/os-Linux/sys-x86_64/registers.c
===================================================================
--- linux-2.6.15.orig/arch/um/os-Linux/sys-x86_64/registers.c   2005-10-28 
12:58:12.000000000 -0400
+++ linux-2.6.15/arch/um/os-Linux/sys-x86_64/registers.c        2006-02-06 
17:34:36.000000000 -0500
@@ -75,6 +75,12 @@ void get_safe_registers(unsigned long *r
        memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long));
 }
 
+#ifndef JB_PC
+#define JB_PC 7
+#define JB_RSP 6
+#define JB_RBP 1
+#endif
+
 void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
 {
        struct __jmp_buf_tag *jmpbuf = buffer;



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to