ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / um / sys-i386 / fault.c
1 /* 
2  * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3  * Licensed under the GPL
4  */
5
6 #include <signal.h>
7 #include "sysdep/ptrace.h"
8 #include "sysdep/sigcontext.h"
9
10 extern unsigned long search_exception_table(unsigned long addr);
11
12 int arch_fixup(unsigned long address, void *sc_ptr)
13 {
14         struct sigcontext *sc = sc_ptr;
15         unsigned long fixup;
16
17         fixup = search_exception_tables(address);
18         if(fixup != 0){
19                 sc->eip = fixup;
20                 return(1);
21         }
22         return(0);
23 }
24
25 /*
26  * Overrides for Emacs so that we follow Linus's tabbing style.
27  * Emacs will notice this stuff at the end of the file and automatically
28  * adjust the settings for this buffer only.  This must remain at the end
29  * of the file.
30  * ---------------------------------------------------------------------------
31  * Local variables:
32  * c-file-style: "linux"
33  * End:
34  */