See PR dotnet/coreclr#509 for some background.
The PR itself isn't correct, since unw_step will return 0 in two cases:
- When it unwinds all the way past main().
- When it unwinds to a managed frame, since it doesn't know what to do.
The PR as is, will break dotnet/coreclr#2, so we need to come up with a plan to differentiate dotnet/coreclr#1 and dotnet/coreclr#2, so that we can bail out and dump the unhanded exception for dotnet/coreclr#1.
It seems the Rip == 0 is llvm libunwind specific, OS X leave the $pc unchanged, so one possibility would be to track the previous pc and cur pc, and enter the guard if they matched.
See PR dotnet/coreclr#509 for some background.
The PR itself isn't correct, since unw_step will return 0 in two cases:
The PR as is, will break dotnet/coreclr#2, so we need to come up with a plan to differentiate dotnet/coreclr#1 and dotnet/coreclr#2, so that we can bail out and dump the unhanded exception for dotnet/coreclr#1.
It seems the Rip == 0 is llvm libunwind specific, OS X leave the $pc unchanged, so one possibility would be to track the previous pc and cur pc, and enter the guard if they matched.