]>
Commit | Line | Data |
---|---|---|
6cbebd54 JB |
1 | --- smalltalk-2.2/sigsegv/src/handler-unix.c.orig 2003-12-19 17:01:08.000000000 +0100 |
2 | +++ smalltalk-2.2/sigsegv/src/handler-unix.c 2004-07-16 21:48:33.121085905 +0200 | |
0cec2735 JB |
3 | @@ -14,7 +14,7 @@ |
4 | You should have received a copy of the GNU General Public License | |
5 | along with this program; if not, write to the Free Software Foundation, | |
6cbebd54 | 6 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ |
0cec2735 JB |
7 | - |
8 | +#define _GNU_SOURCE | |
9 | #include "sigsegv.h" | |
10 | ||
11 | #include <stddef.h> /* needed for NULL on SunOS4 */ | |
12 | --- smalltalk-2.1.8/sigsegv/src/fault-linux-x86_64.h.orig 2003-12-19 17:01:08.000000000 +0100 | |
13 | +++ smalltalk-2.1.8/sigsegv/src/fault-linux-x86_64.h 2004-07-16 21:53:05.857555189 +0200 | |
14 | @@ -15,8 +15,10 @@ | |
15 | along with this program; if not, write to the Free Software Foundation, | |
16 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | |
17 | ||
18 | -#include <asm/sigcontext.h> | |
19 | +#define _GNU_SOURCE | |
20 | +#include <sys/ucontext.h> | |
21 | ||
22 | -#define SIGSEGV_FAULT_HANDLER_ARGLIST int sig, struct sigcontext sc | |
23 | -#define SIGSEGV_FAULT_CONTEXT (&sc) | |
24 | -#define SIGSEGV_FAULT_STACKPOINTER sc.rsp | |
25 | +#define SIGSEGV_FAULT_HANDLER_ARGLIST int sig, siginfo_t *si, struct ucontext *ctx | |
26 | +#define SIGSEGV_FAULT_ADDRESS ((ctx)->uc_mcontext.gregs[REG_CR2]) | |
27 | +#define SIGSEGV_FAULT_CONTEXT (ctx) | |
28 | +#define SIGSEGV_FAULT_STACKPOINTER ((ctx)->uc_mcontext.gregs[REG_RSP]) | |
29 | --- smalltalk-2.1.8/sigsegv/configure.in.orig 2003-12-19 17:01:08.000000000 +0100 | |
30 | +++ smalltalk-2.1.8/sigsegv/configure.in 2004-07-16 22:41:19.496947430 +0200 | |
31 | @@ -142,6 +142,15 @@ | |
32 | [action.sa_sigaction = &sigsegv_handler; | |
33 | action.sa_flags = SA_SIGINFO;]) | |
34 | ||
35 | + SV_TRY_FAULT([Linux/x86_64], sv_cv_fault_linux_x86_64, [x86_64-*-linux*], | |
36 | + [#define _GNU_SOURCE | |
37 | + #include <sys/ucontext.h> | |
38 | + #ifndef REG_CR2 | |
39 | + # define REG_CR2 22 | |
40 | + #endif], | |
41 | + [int sig, siginfo_t *si, struct ucontext *ctx], | |
42 | + [((ctx)->uc_mcontext.gregs[REG_CR2])]) | |
43 | + | |
44 | SV_TRY_FAULT([Linux/i386], sv_cv_fault_linux_i386, [i?86-*-linux2.[2-9]*], | |
45 | [#include <asm/sigcontext.h>], | |
46 | [int sig, struct sigcontext sc], | |
47 | @@ -266,6 +275,12 @@ | |
48 | esac | |
49 | FAULT_CONTEXT='struct sigcontext' | |
50 | fi | |
51 | + if test "$CFG_FAULT" = fault-none.h && test "$sv_cv_fault_linux_x86_64" = yes; then | |
52 | + case "$host_cpu" in | |
53 | + x86_64) CFG_FAULT=fault-linux-x86_64.h ;; | |
54 | + esac | |
55 | + FAULT_CONTEXT='struct ucontext *' | |
56 | + fi | |
57 | if test "$CFG_FAULT" = fault-none.h && test "$sv_cv_fault_linux_i386" = yes; then | |
58 | case "$host_cpu" in | |
59 | i?86 | x86_64) CFG_FAULT=fault-linux-i386.h ;; | |
60 | @@ -402,10 +417,6 @@ | |
61 | CFG_FAULT=fault-linux-sparc.h | |
62 | FAULT_CONTEXT='struct sigcontext' | |
63 | ;; | |
64 | - x86_64) | |
65 | - CFG_FAULT=fault-linux-x86_64.h | |
66 | - FAULT_CONTEXT='struct sigcontext' | |
67 | - ;; | |
68 | esac | |
69 | ;; | |
70 | beos*) |