Conversation
|
Can you expose some way for priroda to intercept the breakpoint and later continue execution? |
|
@bjorn3 can't Priroda just intercept intrinsic calls and handle |
The |
I don't see what the first sentence has to do with the second. And I expected Priroda anyway has its own EvalContext implementation that just calls the Miri methods as fallbacks? No code would have to be duplicated, just the signatures, right? |
|
What other method do you suggest for Priroda to hook breakpoints? Does that have to block the PR? It's not like the PR makes things any worse here for Priroda, right? It seems unfair to expect @Smittyvb, a first time-contributor, to develop such a system. |
Priroda directly uses miri's
I guess so. I will open an issue on priroda for implementing this. |
Okay, so I assume we can land this PR then. :) @Smittyvb aside from the open comment about the error message, this is ready to land. Thanks a lot for this PR. :) |
79bfdac to
26e97ec
Compare
Co-authored-by: Ralf Jung <post@ralfj.de>
|
Hello, bors, are you listening? |
|
📌 Commit 8d43d72 has been approved by |
|
☀️ Test successful - checks-actions |
The
breakpointintrinsic raises aSIGTRAPsignal. If a debugger is attached to a normal program, thenSIGTRAPcan be used to trigger breakpoints in debuggers likegdb. If there is no debugger, then the program exits with a message likeTrace/breakpoint trap (core dumped). This adds support for the intrinsic in Miri. While actually passing through theSIGTRAPdoesn't make sense in a Miri context (if it just raised the signal normally then it would allow for debugging Miri itself, not the program being evaluated). As such, it just raises an error.