From: Jeremy S. <js...@mv...> - 2002-10-02 01:18:58
|
Rebuilding GDB and such, I've noticed that the offset constants in ptrace.h don't match the actual structures. From ptrace.h: #define REG_REG0 0 #define REG_REG15 15 #define REG_PC 16 #define REG_PR 17 #define REG_SR 18 #define REG_GBR 19 #define REG_MACH 20 #define REG_MACL 21 #define REG_SYSCALL 22 #define REG_FPREG0 23 #define REG_FPREG15 38 #define REG_XFREG0 39 #define REG_XFREG15 54 #define REG_FPSCR 55 #define REG_FPUL 56 and from user.h: struct user_fpu_struct { unsigned long fp_regs[16]; unsigned long xfp_regs[16]; unsigned long fpscr; unsigned long fpul; }; struct user { struct pt_regs regs; /* entire machine state */ struct user_fpu_struct fpu; /* Math Co-processor registers */ and sys_ptrace() just assumes the offset it's given is correct -- and if > sizeof(pt_regs), just indexes into user_fpu_struct... (1) What (if any) recent gdb patches did I miss this time? (2) Are there any objections to including the attached kernel patch to make the offsets consistent? (Note: rebuilding strace after this patch is applied requires changing the constant names there too.) Thanks, --Jeremy Siegel |