user32.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #ifndef USER32_H
  2. #define USER32_H 1
  3. /* IA32 compatible user structures for ptrace. These should be used for 32bit coredumps too. */
  4. struct user_i387_ia32_struct {
  5. u32 cwd;
  6. u32 swd;
  7. u32 twd;
  8. u32 fip;
  9. u32 fcs;
  10. u32 foo;
  11. u32 fos;
  12. u32 st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */
  13. };
  14. /* FSAVE frame with extensions */
  15. struct user32_fxsr_struct {
  16. unsigned short cwd;
  17. unsigned short swd;
  18. unsigned short twd; /* not compatible to 64bit twd */
  19. unsigned short fop;
  20. int fip;
  21. int fcs;
  22. int foo;
  23. int fos;
  24. int mxcsr;
  25. int reserved;
  26. int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
  27. int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
  28. int padding[56];
  29. };
  30. struct user_regs_struct32 {
  31. __u32 ebx, ecx, edx, esi, edi, ebp, eax;
  32. unsigned short ds, __ds, es, __es;
  33. unsigned short fs, __fs, gs, __gs;
  34. __u32 orig_eax, eip;
  35. unsigned short cs, __cs;
  36. __u32 eflags, esp;
  37. unsigned short ss, __ss;
  38. };
  39. struct user32 {
  40. struct user_regs_struct32 regs; /* Where the registers are actually stored */
  41. int u_fpvalid; /* True if math co-processor being used. */
  42. /* for this mess. Not yet used. */
  43. struct user_i387_ia32_struct i387; /* Math Co-processor registers. */
  44. /* The rest of this junk is to help gdb figure out what goes where */
  45. __u32 u_tsize; /* Text segment size (pages). */
  46. __u32 u_dsize; /* Data segment size (pages). */
  47. __u32 u_ssize; /* Stack segment size (pages). */
  48. __u32 start_code; /* Starting virtual address of text. */
  49. __u32 start_stack; /* Starting virtual address of stack area.
  50. This is actually the bottom of the stack,
  51. the top of the stack is always found in the
  52. esp register. */
  53. __u32 signal; /* Signal that caused the core dump. */
  54. int reserved; /* No __u32er used */
  55. __u32 u_ar0; /* Used by gdb to help find the values for */
  56. /* the registers. */
  57. __u32 u_fpstate; /* Math Co-processor pointer. */
  58. __u32 magic; /* To uniquely identify a core file */
  59. char u_comm[32]; /* User command that was responsible */
  60. int u_debugreg[8];
  61. };
  62. #endif