1 --- smalltalk-2.1.8/sigsegv/src/handler-unix.c.orig 2003-12-19 17:01:08.000000000 +0100
2 +++ smalltalk-2.1.8/sigsegv/src/handler-unix.c 2004-07-16 21:48:33.121085905 +0200
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,
6 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
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
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. */
18 -#include <asm/sigcontext.h>
20 +#include <sys/ucontext.h>
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
32 [action.sa_sigaction = &sigsegv_handler;
33 action.sa_flags = SA_SIGINFO;])
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>
41 + [int sig, siginfo_t *si, struct ucontext *ctx],
42 + [((ctx)->uc_mcontext.gregs[REG_CR2])])
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],
49 FAULT_CONTEXT='struct sigcontext'
51 + if test "$CFG_FAULT" = fault-none.h && test "$sv_cv_fault_linux_x86_64" = yes; then
53 + x86_64) CFG_FAULT=fault-linux-x86_64.h ;;
55 + FAULT_CONTEXT='struct ucontext *'
57 if test "$CFG_FAULT" = fault-none.h && test "$sv_cv_fault_linux_i386" = yes; then
59 i?86 | x86_64) CFG_FAULT=fault-linux-i386.h ;;
61 CFG_FAULT=fault-linux-sparc.h
62 FAULT_CONTEXT='struct sigcontext'
65 - CFG_FAULT=fault-linux-x86_64.h
66 - FAULT_CONTEXT='struct sigcontext'