pcsx2
pcsx2 copied to clipboard
Darwin: Implement Mach exception ports instead of signals
Credit goes to the Julia language and Dolphin emulator for their free and open source implementations
Description of Changes
Instead of relying on signal handling for our segfault handler, create mach exception ports.
Rationale behind Changes
I was hoping this would allow me to reliably use lldb but it appears that rosetta might still be a blocker.
Suggested Testing Steps
Test games with self modifying code?
R&C2 Megaturret uses self modifying code, tested (in this case the Mega Megaturret specifically but they should be identical on the SMC front) and works with this PR on macOS 15 with Apple Silicon