https://bugs.winehq.org/show_bug.cgi?id=55102
Bug ID: 55102 Summary: Rework __TRY / __EXCEPT to work on other architectures than x86, e.g. x86_64 Product: Wine Version: 8.10 Hardware: x86-64 OS: Linux Status: NEW Severity: enhancement Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: dark.shadow4@web.de Distribution: ---
There is wine/exception.h that provides a try/catch mechanism using the macros __TRY / __EXCEPT.
There's two versions 1) Use compiler exceptions (define USE_COMPILER_EXCEPTIONS), needs compiler support 2) Use the wine version of exception handling
GCC doesn't support those compiler exceptions, so that's not really an option. The wine implementation however doesn't work on windows.
Underlying problem is that the wine try/catch sets up exceptions like x86, this assumption fails when using x86_64. x86 uses a stack of frame pointers in the TEB, while x86_64 (and others) use SEH metadata instead.
Since it would be nice using try/catch in tests, this would be a welcome improvement.