You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure how much you've looked into this but I made a standalone prototype that attempts reconstructs exception handling semantics from x64 binaries compiled with vs2019. Seems to work pretty good except for some jank at the end where the compiler inserts the code for explicit null throwers and the like.
publicintTryCatchFilter(){try{thrownew Exception("msg");}catch(Exceptione)when(e.Message =="msg2"){return100;}catch(Exception){return101;}// should be unreachablereturn102;}
I had very briefly looked at it and then thrown my hands up and told myself I'd look at it later. It's currently 1:30am so I won't check your code now, but I will take a look when I wake up and see about implementing it. Thanks for all your contributions!
Not sure how much you've looked into this but I made a standalone prototype that attempts reconstructs exception handling semantics from x64 binaries compiled with vs2019. Seems to work pretty good except for some jank at the end where the compiler inserts the code for explicit null throwers and the like.
Code is here: https://github.com/ZingBallyhoo/Cpp2IL/blob/read-exception-info/ReadExceptionInfo/Program.cs
good resources:
https://www.youtube.com/watch?v=COEv2kq_Ht8
https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/
ehdata4_export.h from MSVC includes
https://reactos.org/wiki/Techwiki:SEH64 for vs2017 abi and earlier
http://www.uninformed.org/?v=4&a=1&t=pdf
https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64?view=msvc-160
https://gist.github.com/ZingBallyhoo/f1162fa0b14d5abb47c6eaba22807ae7#file-trycatchtwo-asm
https://gist.github.com/ZingBallyhoo/f1162fa0b14d5abb47c6eaba22807ae7#file-trycatchthree-asm
https://gist.github.com/ZingBallyhoo/f1162fa0b14d5abb47c6eaba22807ae7#file-trycatchfilter-asm
the translator can't deal with mixing filtered and non-filtered handlers
https://forum.unity.com/threads/catching-exception-with-when-clause-will-not-work-as-expected-when-using-il2cpp.989260/
https://www.jacksondunstan.com/articles/4702
https://gist.github.com/ZingBallyhoo/f1162fa0b14d5abb47c6eaba22807ae7#file-trycatchfinally-asm
https://gist.github.com/ZingBallyhoo/f1162fa0b14d5abb47c6eaba22807ae7#file-trycatchnested-asm
https://gist.github.com/ZingBallyhoo/f1162fa0b14d5abb47c6eaba22807ae7#file-trymultiple-asm
https://gist.github.com/ZingBallyhoo/f1162fa0b14d5abb47c6eaba22807ae7#file-trycatchmultiplenested-asm
The text was updated successfully, but these errors were encountered: