[cfe-dev] Microsoft C++ exception handling.

r4start r4start at gmail.com
Thu Jul 26 23:30:23 PDT 2012

On 27/07/2012 04:19, John McCall wrote:
> On Jul 26, 2012, at 3:42 AM, r4start wrote:
>> For C++ EH cl build stub __ehhandler$mangled_function_name (for each
>> function with EH).
>> This stub consist of 2 instructions:
>> __ehhandler$_main:
>> mov         eax,offset __TI1?AUmy_exception1@@+50h (address of __ehfuncinfo)
>> jmp         @ILT+395(___CxxFrameHandler3)
>> How can I implement this behavior?
> Is this for SEH or for Win64 exceptions?
> John.
Yes, this is SEH.

This code does not use stack to forward __ehfuncinfo to CxxFrameHandler, 
so my problem is how can I tell llvm that I need store address in
eax and then jump to  CxxFrameHandler.

Maybe I need new intrinsic function?

  - Dmitry Sokolov.

More information about the cfe-dev mailing list