Allow halting native process with a fake stop reason #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Example idea of how we can stop the cpu process with a fake stop reason so it can be auto-resumed.
This is useful because we want to stop the CPU process to set a breakpoint at the address we get from the roc dbgapi. Stopping the cpu process at the point we get the callback ensures that set the breakpoint before the CPU process tries to load any new kernel code objects.
We need a fake stop reason so that the stop is not actually show to the user. It should be handled automatically by the debugger.
An alternative approach is in #18. There we stop the GPU process with a fake stop reason and use the GPUActions to set the breakpoint. The worry with that implementation is that the CPU process will not be stopped immediately and so we could miss hitting the breakpoint it asks us to set.