Merge pull request #5836 from cjacek/int-3

Windows: Handle interrupt 3 in HandleGuestException
This commit is contained in:
Ryan Houdek authored and GitHub committed 2026-08-21 09:30:01 -07:00
commit c1e9d19809
1 file changed
+7
+7
View File
@@ -42,6 +42,13 @@ static inline EXCEPTION_RECORD HandleGuestException(FEXCore::Core::CpuStateFrame
case FEXCore::X86State::X86_TRAPNO_GP:
if ((Fault.err_code & 0b111) == 0b010) {
switch (Fault.err_code >> 3) {
case 3:
Rip += 2;
Dst.ExceptionAddress = reinterpret_cast<void*>(Rip - 1);
Dst.ExceptionCode = EXCEPTION_BREAKPOINT;
Dst.NumberParameters = 1;
Dst.ExceptionInformation[0] = 0;
return Dst;
case 0x29:
Dst.ExceptionCode = STATUS_STACK_BUFFER_OVERRUN;
Dst.ExceptionAddress = reinterpret_cast<void*>(Rip);