Emil Dotchevski
On Mon, Sep 6, 2010 at 2:44 PM, Anthony Williams
wrote: Emil Dotchevski
writes: On Mon, Sep 6, 2010 at 2:33 AM, Anthony Williams
wrote: Emil Dotchevski
writes: I'm assuming MSVC 9.0 and newer will just work as soon as the appropriate exception_info_offset value is defined in clone_current_exception_msvc.cpp. Anthony?
Yes. Your implementation looks reasonable. It's worth noting that it won't work on WIN64 though.
Thanks once again for the original code.
Good to know it's 32-bit only. What is the reason for that? Is the 64-bit MSVC exception handling code totally different, or does it only differ by offsets and other magic numbers?
The offsets and magic numbers are different. Also, some of the values that are pointers in the 32-bit code are 32-bit offsets from a separately-supplied base pointer in the 64-bit code.
Can you elaborate on this?
Some of the structures are unchanged in size and layout on 64-bit Windows. This means that pointers no longer fit where they did previously, because pointers are now 64-bits instead of 32-bits. Instead of a pointer, those fields now contain 32-bit offsets from a base pointer which is stored separately. Anthony -- Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/ just::thread C++0x thread library http://www.stdthread.co.uk Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976