[cfe-dev] Porting libcxxabi / Unwind to Windows / MingW 32 bit

Nick Kledzik kledzik at apple.com
Tue Oct 29 10:34:16 PDT 2013


On Oct 29, 2013, at 12:11 AM, Yaron Keren <yaron.keren at gmail.com> wrote:

> Hello,
> 
> I'm trying to make libcxxabi / Unwind work on Windows / MingW 32 bit. Attached is a patch to make it compile without warnings and run without crashing.
> 
> However the functionality isn't working yet: upon exception, the IP seems to be completely out of range the FDE tables. This may be related to the memory model / compilation options???
Take a look at UnwindRegisterRestore.s.  When an exception is thrown, unw_getcontext() is called which saves all registers and the return address into a register struct.  Then the FDE info is used to step through each frame and modify the register set.  At which step is the IP register out of bounds?  

It might be that the C files need to be compiled with -fexceptions so that they have unwind tables.

-Nick





More information about the cfe-dev mailing list