user32.h 2.1 KB

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