[PATCH] Fix compilation with MinGW-w64 GCC 4.8.2 64-bit SEH

Kai Nacke kai at redstar.de
Tue Dec 17 04:27:00 PST 2013


Hi Yaron!

On 17.12.2013 10:34, Yaron Keren wrote:
> Hi Kai,
>
> Thanks for the updated patch.
>
> Another question, __register_frame and __deregister_frame are used with
> JIT and MCJIT to dynamically (de)register generated code.
>
> Are these functions missing or not required: without these functions,
> the gcc unwinder won't have the DWARF data for the dynamic code, so will
> exceptions for dynamic-generated code still work? how?

I have no real knowledge of JIT/MCJIT so this my be wrong. My current 
understanding is that __register_frame and __deregister_frame are not 
required on Windows. To get exception handling working, you have to 
generate the UNWIND_INFO and call RtlAddFunctionTable to register and 
RtlDeleteFunctionTable to deregister the unwind information.

Regards,
Kai

> Yaron
>
>
>
> 2013/12/17 Kai Nacke <kai at redstar.de <mailto:kai at redstar.de>>
>
>     Hi Yaron!
>
>     I attach my current patch. This one is also available at
>     http://redstar.de/ldc/win64eh___all_20131217.diff
>     <http://redstar.de/ldc/win64eh_all_20131217.diff>. It supersedes all
>     the referenced source below.
>     This patch is required to support SEH in LLVM. (The patch implements
>     Dwarf EH on top of SEH like gcc 4.8.)
>     I also attach clang.diff. This adds half of SEH support to clang.
>     The required changes in the driver are still missing.
>
>     Regards,
>     Kai
>
>
>     On 17.12.2013 09:58, Yaron Keren wrote:
>
>         Hi Jonathan and Kai,
>
>         Committed patch in revision 197483.
>
>         Regarding SEH Win64 in LLVM/clang, between the patches...
>
>         http://redstar.de/ldc/win64eh___all_20131117.diff
>         <http://redstar.de/ldc/win64eh_all_20131117.diff>
>         http://lists.cs.uiuc.edu/__pipermail/llvm-commits/Week-__of-Mon-20130909/188032.html
>         <http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130909/188032.html>
>         http://lists.cs.uiuc.edu/__pipermail/llvm-commits/Week-__of-Mon-20130909/188029.html
>         <http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130909/188029.html>
>
>         what is required -
>         to support SEH in LLVM?
>         to support SEH in clang?
>
>         Yaron
>
>
>
>         2013/12/17 Yaron Keren <yaron.keren at gmail.com
>         <mailto:yaron.keren at gmail.com>
>         <mailto:yaron.keren at gmail.com <mailto:yaron.keren at gmail.com>>__>
>
>
>
>                 Committed revision 197483.
>
>         http://llvm-reviews.chandlerc.__com/D2378
>         <http://llvm-reviews.chandlerc.com/D2378>
>
>
>
>





More information about the llvm-commits mailing list