mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-21 16:12:47 -05:00
_Unwind_Backtrace and _Unwind_ForcedUnwind call the trace and stop
functions a title passes them, and _Unwind_DeleteException calls the
exception_cleanup of the exception it deletes. Their types in
UnwindAbi.hpp had no APS5_VABI, so on Windows these guest functions were
called with the Microsoft x64 convention: the context and the argument
went to rcx and rdx while the guest reads rdi and rsi. vkQuake
(PPSA99010) imports _Unwind_Backtrace and reads each frame in its
callback (db3ec02c5).
The three types are now APS5_VABI, like the callbacks of __cxa_vec_ctor
and the other libc exports, and so is Cleanup, the exception_cleanup of
the exceptions libc throws. An exception thrown by libstdc++ on Windows
(class GNUCC++) has a host cleanup, so _Unwind_DeleteException passes it
to libgcc's _Unwind_DeleteException, which calls that cleanup as before.
Linux and macOS are unchanged.