fault.c 564 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright 2003 PathScale, Inc.
  3. *
  4. * Licensed under the GPL
  5. */
  6. #include "sysdep/ptrace.h"
  7. /* These two are from asm-um/uaccess.h and linux/module.h, check them. */
  8. struct exception_table_entry
  9. {
  10. unsigned long insn;
  11. unsigned long fixup;
  12. };
  13. const struct exception_table_entry *search_exception_tables(unsigned long add);
  14. int arch_fixup(unsigned long address, struct uml_pt_regs *regs)
  15. {
  16. const struct exception_table_entry *fixup;
  17. fixup = search_exception_tables(address);
  18. if (fixup != 0) {
  19. UPT_IP(regs) = fixup->fixup;
  20. return 1;
  21. }
  22. return 0;
  23. }