sigcontext.h 535 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright 2003 PathScale, Inc.
  3. *
  4. * Licensed under the GPL
  5. */
  6. #ifndef __SYSDEP_X86_64_SIGCONTEXT_H
  7. #define __SYSDEP_X86_64_SIGCONTEXT_H
  8. #include <sysdep/sc.h>
  9. #define IP_RESTART_SYSCALL(ip) ((ip) -= 2)
  10. #define GET_FAULTINFO_FROM_SC(fi, sc) \
  11. { \
  12. (fi).cr2 = SC_CR2(sc); \
  13. (fi).error_code = SC_ERR(sc); \
  14. (fi).trap_no = SC_TRAPNO(sc); \
  15. }
  16. /* This is Page Fault */
  17. #define SEGV_IS_FIXABLE(fi) ((fi)->trap_no == 14)
  18. /* No broken SKAS API, which doesn't pass trap_no, here. */
  19. #define SEGV_MAYBE_FIXABLE(fi) 0
  20. #endif