Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bdb44555
Commit
bdb44555
authored
Oct 28, 2002
by
Lionel Ulmer
Committed by
Alexandre Julliard
Oct 28, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Raise an exception if any Wine or Winelib code does an assert.
parent
629f02b3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
4 deletions
+73
-4
signal_i386.c
dlls/ntdll/signal_i386.c
+21
-0
signal_powerpc.c
dlls/ntdll/signal_powerpc.c
+21
-0
signal_sparc.c
dlls/ntdll/signal_sparc.c
+21
-1
exception.h
include/wine/exception.h
+4
-3
winedbg.c
programs/winedbg/winedbg.c
+3
-0
except.c
win32/except.c
+3
-0
No files found.
dlls/ntdll/signal_i386.c
View file @
bdb44555
...
...
@@ -1040,6 +1040,26 @@ static HANDLER_DEF(int_handler)
}
}
/**********************************************************************
* abrt_handler
*
* Handler for SIGABRT.
*/
static
HANDLER_DEF
(
abrt_handler
)
{
EXCEPTION_RECORD
rec
;
CONTEXT
context
;
save_context
(
&
context
,
HANDLER_CONTEXT
);
rec
.
ExceptionCode
=
EXCEPTION_WINE_ASSERTION
;
rec
.
ExceptionFlags
=
EH_NONCONTINUABLE
;
rec
.
ExceptionRecord
=
NULL
;
rec
.
ExceptionAddress
=
(
LPVOID
)
context
.
Eip
;
rec
.
NumberParameters
=
0
;
EXC_RtlRaiseException
(
&
rec
,
&
context
);
/* Should never return.. */
restore_context
(
&
context
,
HANDLER_CONTEXT
);
}
/***********************************************************************
* set_handler
...
...
@@ -1124,6 +1144,7 @@ BOOL SIGNAL_Init(void)
if
(
set_handler
(
SIGFPE
,
have_sigaltstack
,
(
void
(
*
)())
fpe_handler
)
==
-
1
)
goto
error
;
if
(
set_handler
(
SIGSEGV
,
have_sigaltstack
,
(
void
(
*
)())
segv_handler
)
==
-
1
)
goto
error
;
if
(
set_handler
(
SIGILL
,
have_sigaltstack
,
(
void
(
*
)())
segv_handler
)
==
-
1
)
goto
error
;
if
(
set_handler
(
SIGABRT
,
have_sigaltstack
,
(
void
(
*
)())
abrt_handler
)
==
-
1
)
goto
error
;
#ifdef SIGBUS
if
(
set_handler
(
SIGBUS
,
have_sigaltstack
,
(
void
(
*
)())
segv_handler
)
==
-
1
)
goto
error
;
#endif
...
...
dlls/ntdll/signal_powerpc.c
View file @
bdb44555
...
...
@@ -381,6 +381,26 @@ static HANDLER_DEF(int_handler)
}
}
/**********************************************************************
* abrt_handler
*
* Handler for SIGABRT.
*/
static
HANDLER_DEF
(
abrt_handler
)
{
EXCEPTION_RECORD
rec
;
CONTEXT
context
;
save_context
(
&
context
,
HANDLER_CONTEXT
);
rec
.
ExceptionCode
=
EXCEPTION_WINE_ASSERTION
;
rec
.
ExceptionFlags
=
EH_NONCONTINUABLE
;
rec
.
ExceptionRecord
=
NULL
;
rec
.
ExceptionAddress
=
(
LPVOID
)
context
.
Eip
;
rec
.
NumberParameters
=
0
;
EXC_RtlRaiseException
(
&
rec
,
&
context
);
/* Should never return.. */
restore_context
(
&
context
,
HANDLER_CONTEXT
);
}
/***********************************************************************
* set_handler
...
...
@@ -440,6 +460,7 @@ BOOL SIGNAL_Init(void)
if
(
set_handler
(
SIGFPE
,
have_sigaltstack
,
(
void
(
*
)())
fpe_handler
)
==
-
1
)
goto
error
;
if
(
set_handler
(
SIGSEGV
,
have_sigaltstack
,
(
void
(
*
)())
segv_handler
)
==
-
1
)
goto
error
;
if
(
set_handler
(
SIGILL
,
have_sigaltstack
,
(
void
(
*
)())
segv_handler
)
==
-
1
)
goto
error
;
if
(
set_handler
(
SIGABRT
,
have_sigaltstack
,
(
void
(
*
)())
abrt_handler
)
==
-
1
)
goto
error
;
#ifdef SIGBUS
if
(
set_handler
(
SIGBUS
,
have_sigaltstack
,
(
void
(
*
)())
segv_handler
)
==
-
1
)
goto
error
;
#endif
...
...
dlls/ntdll/signal_sparc.c
View file @
bdb44555
...
...
@@ -343,6 +343,25 @@ static void int_handler( int signal, siginfo_t *info, ucontext_t *ucontext )
}
}
/**********************************************************************
* abrt_handler
*
* Handler for SIGABRT.
*/
static
HANDLER_DEF
(
abrt_handler
)
{
EXCEPTION_RECORD
rec
;
CONTEXT
context
;
save_context
(
&
context
,
HANDLER_CONTEXT
);
rec
.
ExceptionCode
=
EXCEPTION_WINE_ASSERTION
;
rec
.
ExceptionFlags
=
EH_NONCONTINUABLE
;
rec
.
ExceptionRecord
=
NULL
;
rec
.
ExceptionAddress
=
(
LPVOID
)
context
.
Eip
;
rec
.
NumberParameters
=
0
;
EXC_RtlRaiseException
(
&
rec
,
&
context
);
/* Should never return.. */
restore_context
(
&
context
,
HANDLER_CONTEXT
);
}
/***********************************************************************
* set_handler
...
...
@@ -398,7 +417,8 @@ BOOL SIGNAL_Init(void)
if
(
set_handler
(
SIGILL
,
(
void
(
*
)())
ill_handler
)
==
-
1
)
goto
error
;
if
(
set_handler
(
SIGBUS
,
(
void
(
*
)())
bus_handler
)
==
-
1
)
goto
error
;
if
(
set_handler
(
SIGTRAP
,
(
void
(
*
)())
trap_handler
)
==
-
1
)
goto
error
;
return
TRUE
;
if
(
set_handler
(
SIGABRT
,
(
void
(
*
)())
abrt_handler
)
==
-
1
)
goto
error
;
return
TRUE
;
error:
perror
(
"sigaction"
);
...
...
include/wine/exception.h
View file @
bdb44555
...
...
@@ -183,11 +183,12 @@ static inline EXCEPTION_FRAME * WINE_UNUSED __wine_pop_frame( EXCEPTION_FRAME *f
/* Wine-specific exceptions codes */
#define EXCEPTION_WINE_STUB 0x80000100
/* stub entry point called */
#define EXCEPTION_WINE_ASSERTION 0x80000101
/* assertion failed */
/* unhandled return status from vm86 mode */
#define EXCEPTION_VM86_INTx 0x800001
01
#define EXCEPTION_VM86_STI 0x800001
02
#define EXCEPTION_VM86_PICRETURN 0x800001
03
#define EXCEPTION_VM86_INTx 0x800001
10
#define EXCEPTION_VM86_STI 0x800001
11
#define EXCEPTION_VM86_PICRETURN 0x800001
12
extern
void
__wine_enter_vm86
(
CONTEXT
*
context
);
...
...
programs/winedbg/winedbg.c
View file @
bdb44555
...
...
@@ -556,6 +556,9 @@ static BOOL DEBUG_HandleException(EXCEPTION_RECORD *rec, BOOL first_chance, BOOL
DEBUG_Printf
(
DBG_CHN_MESG
,
"unimplemented function %s.%s called"
,
dll
,
name
);
}
break
;
case
EXCEPTION_WINE_ASSERTION
:
DEBUG_Printf
(
DBG_CHN_MESG
,
"assertion failed"
);
break
;
case
EXCEPTION_VM86_INTx
:
DEBUG_Printf
(
DBG_CHN_MESG
,
"interrupt %02lx in vm86 mode"
,
rec
->
ExceptionInformation
[
0
]);
...
...
win32/except.c
View file @
bdb44555
...
...
@@ -135,6 +135,9 @@ static int format_exception_msg( const EXCEPTION_POINTERS *ptr, char *buffer, in
len
=
snprintf
(
buffer
,
size
,
"Unimplemented function %s.%s called"
,
(
char
*
)
rec
->
ExceptionInformation
[
0
],
(
char
*
)
rec
->
ExceptionInformation
[
1
]
);
break
;
case
EXCEPTION_WINE_ASSERTION
:
len
=
snprintf
(
buffer
,
size
,
"Assertion failed"
);
break
;
case
EXCEPTION_VM86_INTx
:
len
=
snprintf
(
buffer
,
size
,
"Unhandled interrupt %02lx in vm86 mode"
,
rec
->
ExceptionInformation
[
0
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment