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
Describe the bug
On ARM Macs ("Apple Silicon"), CATCH_TRAP does work correctly in that it does stop in the debugger. However, you can't single-step from there, or even continue; you are stuck at the same source line forever.
This can be fixed by using the instruction d43e0000 instead of the d4200000 that is used now. This instruction is generated by the __builtin_debugtrap() function, which is also available on i386 and x86_64 and generates the int $3 instruction there. So a simple fix looks like this (against the devel branch):
You're right, it's clang-specific. I was fooled by this claim that it works universally, without reading the comments further down that debunk it. Sorry.
In that case, the fix would be just to replace 0xd4200000 with 0xd43e0000 in the existing code. (It would of course be possible to check __has_builtin(__builtin_debugtrap) and use it if available, and fall back to assembly if not, but it doesn't seem worth it.)
The old instruction would cause the debugger to be stuck at the
triggering source line forever, while the new one should have the
expected semantics, where the debugger can then single-step,
continue. or generally do things, afterwards.
Closes#2422
Describe the bug
On ARM Macs ("Apple Silicon"),
CATCH_TRAP
does work correctly in that it does stop in the debugger. However, you can't single-step from there, or even continue; you are stuck at the same source line forever.This can be fixed by using the instruction
d43e0000
instead of thed4200000
that is used now. This instruction is generated by the__builtin_debugtrap()
function, which is also available on i386 and x86_64 and generates theint $3
instruction there. So a simple fix looks like this (against thedevel
branch):Platform information:
The text was updated successfully, but these errors were encountered: