Back to home page

OSCL-LXR

 
 

    


0001 /* 
0002  * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
0003  * Licensed under the GPL
0004  */
0005 
0006 #include <sysdep/ptrace.h>
0007 
0008 /* These two are from asm-um/uaccess.h and linux/module.h, check them. */
0009 struct exception_table_entry
0010 {
0011     unsigned long insn;
0012     unsigned long fixup;
0013 };
0014 
0015 const struct exception_table_entry *search_exception_tables(unsigned long add);
0016 
0017 /* Compare this to arch/i386/mm/extable.c:fixup_exception() */
0018 int arch_fixup(unsigned long address, struct uml_pt_regs *regs)
0019 {
0020     const struct exception_table_entry *fixup;
0021 
0022     fixup = search_exception_tables(address);
0023     if (fixup) {
0024         UPT_IP(regs) = fixup->fixup;
0025         return 1;
0026     }
0027     return 0;
0028 }