[PATCH] D50564: Add support for SEH unwinding on Windows.
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 14 10:12:09 PDT 2018
zturner added a comment.
In https://reviews.llvm.org/D50564#1199285, @rnk wrote:
> In https://reviews.llvm.org/D50564#1198996, @cdavis5x wrote:
>
> > Could somebody verify that the `DISPATCHER_CONTEXT` struct is defined in `<winnt.h>` for the Win8 and Win10 SDKs? I can't install them right now.
>
>
> I checked both, and they are available, so I think we should guard the definition like this:
>
> // Provide a definition for _DISPATCHER_CONTEXT for Win7 and earlier SDK versions.
> // Mingw64 has always provided this struct.
> #if defined(_LIBUNWIND_SUPPORT_SEH_UNWIND) && !defined(__MINGW64__) && defined(WINVER) && WINVER < _WIN32_WINNT_WIN8
> # if defined(__x86_64__)
> typedef struct _DISPATCHER_CONTEXT { ... } DISPATCHER_CONTEXT;
> # elif defined(__arm__)
> typedef struct _DISPATCHER_CONTEXT { ... } DISPATCHER_CONTEXT;
> # endif
> #endif
>
>
> Does that seem right? I'm not super familiar with SDK version detection, so I might have the wrong macros.
I believe you need to check `VER_PRODUCTBUILD` from `<ntverp.h>` if you are looking for the version of the Windows SDK that is being used to build the current application.
Repository:
rUNW libunwind
https://reviews.llvm.org/D50564
More information about the llvm-commits
mailing list