1
0

user.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. typedef struct user_fpregs_struct {
  2. uint16_t cwd, swd, ftw, fop;
  3. uint64_t rip, rdp;
  4. uint32_t mxcsr, mxcr_mask;
  5. uint32_t st_space[32], xmm_space[64], padding[24];
  6. } elf_fpregset_t;
  7. struct user_regs_struct {
  8. unsigned long r15, r14, r13, r12, rbp, rbx, r11, r10, r9, r8;
  9. unsigned long rax, rcx, rdx, rsi, rdi, orig_rax, rip;
  10. unsigned long cs, eflags, rsp, ss, fs_base, gs_base, ds, es, fs, gs;
  11. };
  12. #define ELF_NGREG 27
  13. typedef unsigned long long elf_greg_t, elf_gregset_t[ELF_NGREG];
  14. struct user {
  15. struct user_regs_struct regs;
  16. int u_fpvalid;
  17. struct user_fpregs_struct i387;
  18. unsigned long u_tsize;
  19. unsigned long u_dsize;
  20. unsigned long u_ssize;
  21. unsigned long start_code;
  22. unsigned long start_stack;
  23. long signal;
  24. int reserved;
  25. struct user_regs_struct *u_ar0;
  26. struct user_fpregs_struct *u_fpstate;
  27. unsigned long magic;
  28. char u_comm[32];
  29. unsigned long u_debugreg[8];
  30. };
  31. #define PAGE_MASK (~(PAGESIZE-1))
  32. #define NBPG PAGESIZE
  33. #define UPAGES 1
  34. #define HOST_TEXT_START_ADDR (u.start_code)
  35. #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)