stub_segv.c 455 B

123456789101112131415161718192021
  1. /*
  2. * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  3. * Licensed under the GPL
  4. */
  5. #include <sysdep/stub.h>
  6. #include <sysdep/faultinfo.h>
  7. #include <sysdep/mcontext.h>
  8. #include <sys/ucontext.h>
  9. void __attribute__ ((__section__ (".__syscall_stub")))
  10. stub_segv_handler(int sig, siginfo_t *info, void *p)
  11. {
  12. ucontext_t *uc = p;
  13. GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA),
  14. &uc->uc_mcontext);
  15. trap_myself();
  16. }