ptrace-i386.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
  3. * Licensed under the GPL
  4. */
  5. #ifndef __UM_PTRACE_I386_H
  6. #define __UM_PTRACE_I386_H
  7. #define HOST_AUDIT_ARCH AUDIT_ARCH_I386
  8. #include "sysdep/ptrace.h"
  9. #include "asm/ptrace-generic.h"
  10. #define PT_REGS_EAX(r) UPT_EAX(&(r)->regs)
  11. #define PT_REGS_EBX(r) UPT_EBX(&(r)->regs)
  12. #define PT_REGS_ECX(r) UPT_ECX(&(r)->regs)
  13. #define PT_REGS_EDX(r) UPT_EDX(&(r)->regs)
  14. #define PT_REGS_ESI(r) UPT_ESI(&(r)->regs)
  15. #define PT_REGS_EDI(r) UPT_EDI(&(r)->regs)
  16. #define PT_REGS_EBP(r) UPT_EBP(&(r)->regs)
  17. #define PT_REGS_CS(r) UPT_CS(&(r)->regs)
  18. #define PT_REGS_SS(r) UPT_SS(&(r)->regs)
  19. #define PT_REGS_DS(r) UPT_DS(&(r)->regs)
  20. #define PT_REGS_ES(r) UPT_ES(&(r)->regs)
  21. #define PT_REGS_FS(r) UPT_FS(&(r)->regs)
  22. #define PT_REGS_GS(r) UPT_GS(&(r)->regs)
  23. #define PT_REGS_EFLAGS(r) UPT_EFLAGS(&(r)->regs)
  24. #define PT_REGS_ORIG_SYSCALL(r) PT_REGS_EAX(r)
  25. #define PT_REGS_SYSCALL_RET(r) PT_REGS_EAX(r)
  26. #define PT_FIX_EXEC_STACK(sp) do ; while(0)
  27. /* Cope with a conditional i386 definition. */
  28. #undef profile_pc
  29. #define profile_pc(regs) PT_REGS_IP(regs)
  30. #define user_mode(r) UPT_IS_USER(&(r)->regs)
  31. #endif
  32. /*
  33. * Overrides for Emacs so that we follow Linus's tabbing style.
  34. * Emacs will notice this stuff at the end of the file and automatically
  35. * adjust the settings for this buffer only. This must remain at the end
  36. * of the file.
  37. * ---------------------------------------------------------------------------
  38. * Local variables:
  39. * c-file-style: "linux"
  40. * End:
  41. */