Fix the osx exception port forwarding limitations.
authorMike McLaughlin <mikem@microsoft.com>
Wed, 27 Jan 2016 00:37:14 +0000 (16:37 -0800)
committerMike McLaughlin <mikem@microsoft.com>
Fri, 26 Feb 2016 19:42:37 +0000 (11:42 -0800)
commitdf902204f51fe58282262c3a6a154a3a53ce70d0
treedec9e847de777e42dfe364ad1ead36369756ac29
parentb1770a79832dc4713e0962c1c35235039ceb8595
Fix the osx exception port forwarding limitations.

Cleanup CThreadMachExceptionHandlerNode/CThreadMachExceptionHandlers.

Send forward exception, save thread info, restore thread back to faulting context and restart faulting instruction and forward.

Add MachExceptionInfo struct used to pass all the exception state around. Bump the IP back one when restarting breakpoint exceptions.

Match lldb exception port options.  Found and fix bug with MACH_EXCEPTION_CODES behavior. Needed pack(4) around the exception message structs.

Cleaned up the _ASSERT, CHECK_MACH, FATAL_ERROR macros.

Dump the task level exception ports.

Add more checks to PAL SXS tests. Validate that the fault addr (ExceptionRecord.ExceptionInformation[1]) is correct.  Check that a third party signal handler will be properly chained to.

Commit migrated from https://github.com/dotnet/coreclr/commit/9f6654b6faec5730f71d6c547ea497e406ae4d47
src/coreclr/src/pal/src/arch/i386/dispatchexceptionwrapper.S
src/coreclr/src/pal/src/exception/machexception.cpp
src/coreclr/src/pal/src/exception/machexception.h
src/coreclr/src/pal/src/exception/machmessage.cpp
src/coreclr/src/pal/src/exception/machmessage.h
src/coreclr/src/pal/src/include/pal/thread.hpp
src/coreclr/src/pal/src/thread/thread.cpp
src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/dlltest1.cpp
src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/dlltest2.cpp
src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/exceptionsxs.cpp