about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/x86_64
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2002-03-20 10:18:29 +0000
committerAndreas Jaeger <aj@suse.de>2002-03-20 10:18:29 +0000
commitcb50c2187f0eba31b0799fa692dfd749dfd52142 (patch)
treeac9448eae183bf63898895a26cf61ab4cb8b2a50 /sysdeps/unix/sysv/linux/x86_64
parent6340375b038b512af1b462e4c76b2e378b9dbe1d (diff)
downloadglibc-cb50c2187f0eba31b0799fa692dfd749dfd52142.tar.gz
glibc-cb50c2187f0eba31b0799fa692dfd749dfd52142.tar.xz
glibc-cb50c2187f0eba31b0799fa692dfd749dfd52142.zip
Update.
2002-03-20  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/sysv/linux/x86_64/sys/user.h (struct
	user_fpregs_struct): Fix for changed kernel struct.
	(struct user_regs_struct): Likewise.
	(struct user): Likewise.
	Add 32-bit x86 compatibility.

	* sysdeps/unix/sysv/linux/x86_64/sys/reg.h: Add more registers.
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86_64')
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sys/reg.h6
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sys/user.h94
2 files changed, 92 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/reg.h b/sysdeps/unix/sysv/linux/x86_64/sys/reg.h
index c34eb96e78..5d3df0eb21 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sys/reg.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sys/reg.h
@@ -46,6 +46,12 @@
 # define EFLAGS	18
 # define RSP	19
 # define SS	20
+# define FS_BASE 21
+# define GS_BASE 22
+# define DS	23
+# define ES	24
+# define FS	25
+# define GS	26
 #else
 
 /* Index into an array of 4 byte integers returned from ptrace for
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/user.h b/sysdeps/unix/sysv/linux/x86_64/sys/user.h
index 2df7b2e46d..98820a8d66 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sys/user.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,21 +23,23 @@
    too much into it.  Don't use it for anything other than GDB unless
    you know what you are doing.  */
 
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 64
+
 struct user_fpregs_struct
 {
   unsigned short int cwd;
   unsigned short int swd;
   unsigned short int twd;
   unsigned short int fop;
-  unsigned int fip;
-  unsigned int fcs;
-  unsigned int foo;
-  unsigned int fos;
+  unsigned long int frip;
+  unsigned long int frdp;
   unsigned int mxcsr;
   unsigned int reserved;
   unsigned int st_space[32];   /* 8*16 bytes for each FP-reg = 128 bytes */
-  unsigned int xmm_space[32];  /* 8*16 bytes for each XMM-reg = 128 bytes */
-  unsigned int padding[56];
+  unsigned int xmm_space[64];  /* 16*16 bytes for each XMM-reg = 128 bytes */
+  unsigned int padding[24];
 };
 
 struct user_regs_struct
@@ -64,7 +66,82 @@ struct user_regs_struct
   unsigned long rsp;
   unsigned long ss;
   unsigned long fs_base;
-  unsigned long kernel_gs_base;
+  unsigned long gs_base;
+  unsigned long ds;
+  unsigned long es;
+  unsigned long fs;
+  unsigned long gs;  
+};
+
+struct user
+{
+  struct user_regs_struct	regs;
+  int				u_fpvalid;
+  struct user_fpregs_struct	i387;
+  unsigned long int		u_tsize;
+  unsigned long int		u_dsize;
+  unsigned long int		u_ssize;
+  unsigned long			start_code;
+  unsigned long			start_stack;
+  long int			signal;
+  int				reserved;
+  struct user_regs_struct*	u_ar0;
+  struct user_fpregs_struct*	u_fpstate;
+  unsigned long int		magic;
+  char				u_comm [32];
+  unsigned long int		u_debugreg [8];
+};
+
+#else
+/* These are the 32-bit x86 structures.  */
+struct user_fpregs_struct
+{
+  long int cwd;
+  long int swd;
+  long int twd;
+  long int fip;
+  long int fcs;
+  long int foo;
+  long int fos;
+  long int st_space [20];
+};
+
+struct user_fpxregs_struct
+{
+  unsigned short int cwd;
+  unsigned short int swd;
+  unsigned short int twd;
+  unsigned short int fop;
+  long int fip;
+  long int fcs;
+  long int foo;
+  long int fos;
+  long int mxcsr;
+  long int reserved;
+  long int st_space[32];   /* 8*16 bytes for each FP-reg = 128 bytes */
+  long int xmm_space[32];  /* 8*16 bytes for each XMM-reg = 128 bytes */
+  long int padding[56];
+};
+
+struct user_regs_struct
+{
+  long int ebx;
+  long int ecx;
+  long int edx;
+  long int esi;
+  long int edi;
+  long int ebp;
+  long int eax;
+  long int xds;
+  long int xes;
+  long int xfs;
+  long int xgs;
+  long int orig_eax;
+  long int eip;
+  long int xcs;
+  long int eflags;
+  long int esp;
+  long int xss;
 };
 
 struct user
@@ -85,6 +162,7 @@ struct user
   char				u_comm [32];
   int				u_debugreg [8];
 };
+#endif  /* __WORDSIZE */
 
 #define PAGE_SHIFT		12
 #define PAGE_SIZE		(1UL << PAGE_SHIFT)