4 extern void wine_debug(unsigned int*);
8 #include <linux/sched.h>
9 #include <asm/system.h>
12 struct sigaction segv_act
;
16 struct sigcontext_struct
{
17 unsigned short sc_gs
, __gsh
;
18 unsigned short sc_fs
, __fsh
;
19 unsigned short sc_es
, __esh
;
20 unsigned short sc_ds
, __dsh
;
29 unsigned long sc_trapno
;
32 unsigned short sc_cs
, __csh
;
33 unsigned long sc_eflags
;
34 unsigned long esp_at_signal
;
35 unsigned short sc_ss
, __ssh
;
37 unsigned long oldmask
;
43 static void win_fault(int signal
, struct sigcontext_struct context
){
44 struct sigcontext_struct
*scp
= &context
;
46 static void win_fault(int signal
, int code
, struct sigcontext
*scp
){
49 wine_debug((unsigned int *) scp
); /* Enter our debugger */
52 char realtext
[] = "This is what should really be printed\n";
58 segv_act
.sa_handler
= (__sighandler_t
) win_fault
;
59 sigaction(SIGSEGV
, &segv_act
, NULL
);
61 #if defined(__NetBSD__) || defined(__FreeBSD__)
64 sigemptyset(&sig_mask
);
65 segv_act
.sa_handler
= (__sighandler_t
) win_fault
;
66 segv_act
.sa_flags
= 0;
67 segv_act
.sa_mask
= sig_mask
;
68 if (sigaction(SIGSEGV
, &segv_act
, NULL
) < 0) {
74 fprintf(stderr
,"%x\n", realtext
);
76 /* Now force a segmentation fault */
77 pnt
= (char *) 0xc0000000;
79 fprintf(stderr
,"%s", pnt
);
85 unsigned int * wine_files
= NULL
;
87 GetEntryPointFromOrdinal(int wpnt
, int ordinal
) {}