patch-2.1.12 linux/include/asm-m68k/elf.h

Next file: linux/include/asm-m68k/io.h
Previous file: linux/include/asm-m68k/byteorder.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.11/linux/include/asm-m68k/elf.h linux/include/asm-m68k/elf.h
@@ -6,10 +6,11 @@
  */
 
 #include <asm/ptrace.h>
+#include <asm/user.h>
 
 typedef unsigned long elf_greg_t;
 
-#define ELF_NGREG 20 /* d1-d7/a0-a6/d0/usp/orig_d0/sr/pc/fmtvec */
+#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
 
 typedef struct user_m68kfp_struct elf_fpregset_t;
@@ -45,9 +46,10 @@
 	pr_reg[8] = regs->a1;						\
 	pr_reg[14] = regs->d0;						\
 	pr_reg[15] = rdusp();						\
-	pr_reg[16] = 0; /* orig_d0 */					\
+	pr_reg[16] = regs->orig_d0;					\
 	pr_reg[17] = regs->sr;						\
 	pr_reg[18] = regs->pc;						\
+	pr_reg[19] = (regs->format << 12) | regs->vector;		\
 	{								\
 	  struct switch_stack *sw = ((struct switch_stack *)regs) - 1;	\
 	  pr_reg[5] = sw->d6;						\

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov