diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 599a4dd4936..b6321ea3b93 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -33,7 +33,6 @@ #include "winuser.h" #include "wincrypt.h" #include "wine/debug.h" -#include "wine/exception.h" #include "crypt32_private.h" WINE_DEFAULT_DEBUG_CHANNEL(crypt); diff --git a/dlls/dbghelp/coff.c b/dlls/dbghelp/coff.c index 285182f682a..8684a493310 100644 --- a/dlls/dbghelp/coff.c +++ b/dlls/dbghelp/coff.c @@ -41,7 +41,6 @@ #include "winbase.h" #include "winternl.h" -#include "wine/exception.h" #include "wine/debug.h" #include "dbghelp_private.h" #include "wine/mscvpdb.h" diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index 478fb5d4a27..59902b43761 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -24,7 +24,6 @@ #define COBJMACROS #include "wine/test.h" -#include "wine/exception.h" #include "ddraw.h" #include "d3d.h" #include "unknwn.h" diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index 6f12ddfe7b2..4810feb4987 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -38,9 +38,7 @@ #include "winerror.h" #include "wincon.h" #include "wine/condrv.h" -#include "wine/exception.h" #include "wine/debug.h" -#include "excpt.h" #include "kernel_private.h" WINE_DEFAULT_DEBUG_CHANNEL(console); diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index 4d6f893c92d..6592bede4a9 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -39,7 +39,6 @@ #include "fileapi.h" #include "shlwapi.h" -#include "wine/exception.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(file); diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c index 415f7f65714..433366d364b 100644 --- a/dlls/kernel32/module.c +++ b/dlls/kernel32/module.c @@ -34,7 +34,6 @@ #include "kernel_private.h" #include "psapi.h" -#include "wine/exception.h" #include "wine/list.h" #include "wine/asm.h" #include "wine/debug.h" diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 17a23cca08d..01f45210ae1 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -35,7 +35,6 @@ #include "kernel_private.h" #include "psapi.h" #include "ddk/wdm.h" -#include "wine/exception.h" #include "wine/asm.h" #include "wine/debug.h" diff --git a/dlls/krnl386.exe16/instr.c b/dlls/krnl386.exe16/instr.c index 789c6dfb212..1b1ed2d9633 100644 --- a/dlls/krnl386.exe16/instr.c +++ b/dlls/krnl386.exe16/instr.c @@ -30,7 +30,6 @@ #include "wine/debug.h" #include "kernel16_private.h" #include "dosexe.h" -#include "wine/exception.h" WINE_DEFAULT_DEBUG_CHANNEL(int); WINE_DECLARE_DEBUG_CHANNEL(io); diff --git a/dlls/krnl386.exe16/int21.c b/dlls/krnl386.exe16/int21.c index 5129fbd8eb6..6340de86ccc 100644 --- a/dlls/krnl386.exe16/int21.c +++ b/dlls/krnl386.exe16/int21.c @@ -38,7 +38,6 @@ #include "winerror.h" #include "winuser.h" #include "wine/debug.h" -#include "wine/exception.h" /* * Note: diff --git a/dlls/krnl386.exe16/int31.c b/dlls/krnl386.exe16/int31.c index 01c3102d985..a97dd8b1728 100644 --- a/dlls/krnl386.exe16/int31.c +++ b/dlls/krnl386.exe16/int31.c @@ -30,7 +30,6 @@ #include "excpt.h" #include "wine/debug.h" -#include "wine/exception.h" WINE_DEFAULT_DEBUG_CHANNEL(int31); diff --git a/dlls/msvcp140_1/tests/msvcp140_1.c b/dlls/msvcp140_1/tests/msvcp140_1.c index 115e870031d..95166b05d67 100644 --- a/dlls/msvcp140_1/tests/msvcp140_1.c +++ b/dlls/msvcp140_1/tests/msvcp140_1.c @@ -24,8 +24,6 @@ #include "winnls.h" #include "wine/test.h" -#include "wine/exception.h" -#include "winbase.h" typedef unsigned char MSVCP_bool; diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index 5c4f997411a..5376d4f2da1 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -26,7 +26,7 @@ #include "winbase.h" #include "winternl.h" #include "wine/debug.h" -#include "wine/exception.h" + WINE_DEFAULT_DEBUG_CHANNEL(msvcp); #if _MSVCP_VER >= 110 diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c index 8130e34b2c4..3920b0e9580 100644 --- a/dlls/msvcrt/except.c +++ b/dlls/msvcrt/except.c @@ -31,7 +31,6 @@ #include "windef.h" #include "winbase.h" #include "winternl.h" -#include "wine/exception.h" #include "msvcrt.h" #include "excpt.h" #include "wincon.h" diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c index 1a53741de57..b35765ba2fe 100644 --- a/dlls/ntdll/unix/process.c +++ b/dlls/ntdll/unix/process.c @@ -61,7 +61,6 @@ #include "winioctl.h" #include "unix_private.h" #include "wine/condrv.h" -#include "wine/exception.h" #include "wine/server.h" #include "wine/debug.h" diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index 5a5d49bf4bd..bbe7d53cba3 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -69,7 +69,6 @@ #include "winternl.h" #include "ddk/wdm.h" #include "wine/server.h" -#include "wine/exception.h" #include "wine/debug.h" #include "unix_private.h" diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c index e88a935ca31..839a75b4cac 100644 --- a/dlls/ntdll/unix/thread.c +++ b/dlls/ntdll/unix/thread.c @@ -67,7 +67,6 @@ #include "ddk/wdm.h" #include "wine/server.h" #include "wine/debug.h" -#include "wine/exception.h" #include "unix_private.h" WINE_DEFAULT_DEBUG_CHANNEL(thread); diff --git a/dlls/ntoskrnl.exe/instr.c b/dlls/ntoskrnl.exe/instr.c index f197570db0c..f6c775e2597 100644 --- a/dlls/ntoskrnl.exe/instr.c +++ b/dlls/ntoskrnl.exe/instr.c @@ -31,7 +31,6 @@ #include "ddk/wdm.h" #include "excpt.h" #include "wine/debug.h" -#include "wine/exception.h" #define KSHARED_USER_DATA_PAGE_SIZE 0x1000 diff --git a/dlls/user32/lstr.c b/dlls/user32/lstr.c index 3c24b8700c1..a5a906a9076 100644 --- a/dlls/user32/lstr.c +++ b/dlls/user32/lstr.c @@ -32,8 +32,6 @@ #include "winuser.h" #include "winerror.h" -#include "wine/exception.h" - /*********************************************************************** * CharNextExW (USER32.@) diff --git a/dlls/user32/png.c b/dlls/user32/png.c index bcd619fe52b..7d30846173f 100644 --- a/dlls/user32/png.c +++ b/dlls/user32/png.c @@ -42,7 +42,6 @@ #include "winerror.h" #include "winnls.h" #include "winternl.h" -#include "wine/exception.h" #include "wine/server.h" #include "controls.h" #include "win.h" diff --git a/dlls/win32u/main.c b/dlls/win32u/main.c index f0a052be545..2134c095602 100644 --- a/dlls/win32u/main.c +++ b/dlls/win32u/main.c @@ -26,7 +26,6 @@ #include "winbase.h" #include "winnt.h" #include "winternl.h" -#include "wine/exception.h" #include "wine/unixlib.h" extern void *__wine_syscall_dispatcher DECLSPEC_HIDDEN; diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index cef151c7bf2..46fbe86f549 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -52,8 +52,6 @@ #include "iphlpapi.h" #include "dhcpcsdk.h" -#include "wine/exception.h" - #include "internet.h" #include "resource.h" diff --git a/dlls/wow64cpu/cpu.c b/dlls/wow64cpu/cpu.c index 8293d596ec4..da6fa42894c 100644 --- a/dlls/wow64cpu/cpu.c +++ b/dlls/wow64cpu/cpu.c @@ -26,7 +26,6 @@ #include "winnt.h" #include "winternl.h" #include "wine/asm.h" -#include "wine/exception.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(wow); diff --git a/dlls/ws2_32/ws2_32_private.h b/dlls/ws2_32/ws2_32_private.h index 85f6b4dbc1c..8ad3e0d17e9 100644 --- a/dlls/ws2_32/ws2_32_private.h +++ b/dlls/ws2_32/ws2_32_private.h @@ -50,7 +50,6 @@ #include "ip2string.h" #include "wine/afd.h" #include "wine/debug.h" -#include "wine/exception.h" #include "wine/unixlib.h" #define DECLARE_CRITICAL_SECTION(cs) \ diff --git a/include/wine/exception.h b/include/wine/exception.h index 94796a78e4f..812b4641d62 100644 --- a/include/wine/exception.h +++ b/include/wine/exception.h @@ -22,6 +22,7 @@ #define __WINE_WINE_EXCEPTION_H #include +#include #include #ifdef __cplusplus @@ -286,37 +287,6 @@ static inline EXCEPTION_REGISTRATION_RECORD *__wine_get_frame(void) #endif } -/* Exception handling flags - from OS/2 2.0 exception handling */ - -/* Win32 seems to use the same flags as ExceptionFlags in an EXCEPTION_RECORD */ -#define EH_NONCONTINUABLE 0x01 -#define EH_UNWINDING 0x02 -#define EH_EXIT_UNWIND 0x04 -#define EH_STACK_INVALID 0x08 -#define EH_NESTED_CALL 0x10 -#define EH_TARGET_UNWIND 0x20 -#define EH_COLLIDED_UNWIND 0x40 - -/* Wine-specific exceptions codes */ - -#define EXCEPTION_WINE_STUB 0x80000100 /* stub entry point called */ -#define EXCEPTION_WINE_ASSERTION 0x80000101 /* assertion failed */ - -/* Wine extension; Windows doesn't have a name for this code. This is an - undocumented exception understood by MS VC debugger, allowing the program - to name a particular thread. Search google.com or deja.com for "0x406d1388" - for more info. */ -#define EXCEPTION_WINE_NAME_THREAD 0x406D1388 - -/* used for C++ exceptions in msvcrt - * parameters: - * [0] CXX_FRAME_MAGIC - * [1] pointer to exception object - * [2] pointer to type - */ -#define EXCEPTION_WINE_CXX_EXCEPTION 0xe06d7363 -#define EXCEPTION_WINE_CXX_FRAME_MAGIC 0x19930520 - #ifdef __cplusplus } #endif diff --git a/include/winternl.h b/include/winternl.h index 200756569d5..46ee508e89f 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -3438,6 +3438,37 @@ typedef struct _RTL_PROCESS_MODULE_INFORMATION_EX #define THREAD_CREATE_FLAGS_ACCESS_CHECK_IN_TARGET 0x00000020 #define THREAD_CREATE_FLAGS_INITIAL_THREAD 0x00000080 +#define EH_NONCONTINUABLE 0x01 +#define EH_UNWINDING 0x02 +#define EH_EXIT_UNWIND 0x04 +#define EH_STACK_INVALID 0x08 +#define EH_NESTED_CALL 0x10 +#define EH_TARGET_UNWIND 0x20 +#define EH_COLLIDED_UNWIND 0x40 + +#ifdef __WINESRC__ + +/* Wine-specific exceptions codes */ + +#define EXCEPTION_WINE_STUB 0x80000100 /* stub entry point called */ +#define EXCEPTION_WINE_ASSERTION 0x80000101 /* assertion failed */ + +/* Wine extension; Windows doesn't have a name for this code. This is an + undocumented exception understood by MS VC debugger, allowing the program + to name a particular thread. */ +#define EXCEPTION_WINE_NAME_THREAD 0x406D1388 + +/* used for C++ exceptions in msvcrt + * parameters: + * [0] CXX_FRAME_MAGIC + * [1] pointer to exception object + * [2] pointer to type + */ +#define EXCEPTION_WINE_CXX_EXCEPTION 0xe06d7363 +#define EXCEPTION_WINE_CXX_FRAME_MAGIC 0x19930520 + +#endif + typedef LONG (CALLBACK *PRTL_EXCEPTION_FILTER)(PEXCEPTION_POINTERS); typedef void (CALLBACK *PTP_IO_CALLBACK)(PTP_CALLBACK_INSTANCE,void*,void*,IO_STATUS_BLOCK*,PTP_IO); diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c index d018a715aa7..522e4fdb506 100644 --- a/programs/winedbg/gdbproxy.c +++ b/programs/winedbg/gdbproxy.c @@ -39,7 +39,6 @@ #include "winbase.h" #include "winsock2.h" #include "tlhelp32.h" -#include "wine/exception.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(winedbg); diff --git a/programs/winedbg/info.c b/programs/winedbg/info.c index f334aa3576d..dc0e6591f1f 100644 --- a/programs/winedbg/info.c +++ b/programs/winedbg/info.c @@ -29,7 +29,6 @@ #include "winuser.h" #include "tlhelp32.h" #include "wine/debug.h" -#include "wine/exception.h" WINE_DEFAULT_DEBUG_CHANNEL(winedbg); diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c index 4aaa10fa720..3372a001dfb 100644 --- a/programs/winedbg/tgt_active.c +++ b/programs/winedbg/tgt_active.c @@ -28,7 +28,6 @@ #include "resource.h" #include "winternl.h" #include "wine/debug.h" -#include "wine/exception.h" WINE_DEFAULT_DEBUG_CHANNEL(winedbg); diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c index e7cdaff67d3..0a629e880fa 100644 --- a/programs/winedbg/winedbg.c +++ b/programs/winedbg/winedbg.c @@ -23,8 +23,6 @@ #include "debugger.h" #include "winternl.h" -#include "wine/exception.h" - #include "wine/debug.h" /* TODO list: