uml: tidy ptrace interface

Tidy the ptrace interface code.  Removed a bunch of unused macros.
Started converting register sets from arrays of longs to structures.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bu işleme şunda yer alıyor:
Jeff Dike
2008-05-12 14:01:50 -07:00
işlemeyi yapan: Linus Torvalds
ebeveyn 46d7b522eb
işleme 47906dd9e6
6 değiştirilmiş dosya ile 23 ekleme ve 62 silme

Dosyayı Görüntüle

@@ -41,38 +41,10 @@
#define PT_SP_OFFSET PT_OFFSET(UESP)
#define PT_SP(regs) ((regs)[UESP])
#define FP_SIZE ((HOST_XFP_SIZE > HOST_FP_SIZE) ? HOST_XFP_SIZE : HOST_FP_SIZE)
#define FP_SIZE ((HOST_FPX_SIZE > HOST_FP_SIZE) ? HOST_FPX_SIZE : HOST_FP_SIZE)
#ifndef FRAME_SIZE
#define FRAME_SIZE (17)
#endif
#define FRAME_SIZE_OFFSET (FRAME_SIZE * sizeof(unsigned long))
#define FP_FRAME_SIZE (27)
#define FPX_FRAME_SIZE (128)
#ifdef PTRACE_GETREGS
#define UM_HAVE_GETREGS
#endif
#ifdef PTRACE_SETREGS
#define UM_HAVE_SETREGS
#endif
#ifdef PTRACE_GETFPREGS
#define UM_HAVE_GETFPREGS
#endif
#ifdef PTRACE_SETFPREGS
#define UM_HAVE_SETFPREGS
#endif
#ifdef PTRACE_GETFPXREGS
#define UM_HAVE_GETFPXREGS
#endif
#ifdef PTRACE_SETFPXREGS
#define UM_HAVE_SETFPXREGS
#endif
#endif

Dosyayı Görüntüle

@@ -48,7 +48,8 @@
#define PT_ORIG_RAX_OFFSET (ORIG_RAX)
#define PT_ORIG_RAX(regs) ((regs)[PT_INDEX(ORIG_RAX)])
/* x86_64 FC3 doesn't define this in /usr/include/linux/ptrace.h even though
/*
* x86_64 FC3 doesn't define this in /usr/include/linux/ptrace.h even though
* it's defined in the kernel's include/linux/ptrace.h. Additionally, use the
* 2.4 name and value for 2.4 host compatibility.
*/
@@ -56,7 +57,8 @@
#define PTRACE_OLDSETOPTIONS 21
#endif
/* These are before the system call, so the system call number is RAX
/*
* These are before the system call, so the system call number is RAX
* rather than ORIG_RAX, and arg4 is R10 rather than RCX
*/
#define REGS_SYSCALL_NR PT_INDEX(RAX)
@@ -73,14 +75,3 @@
#define FP_SIZE (HOST_FP_SIZE)
#endif
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end
* of the file.
* ---------------------------------------------------------------------------
* Local variables:
* c-file-style: "linux"
* End:
*/