[amd] Set gpu loader breakpoint by name #20
Merged
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.
Currently we set the gpu loader breakpoint by address in the
amd_dbgapi_insert_breakpoint_callback
callback. This means we need to halt the CPU in order to correctly set the breakpoint. When we halt the CPU it shows up as a public stop to the user and interrupts the debugging flow.This PR changes it so that we set the loader breakpoint by name when we first create the gpu connection. We set the breakpoint on the
rocr::_loader_debug_state
function which was discovered by looking up the address passed into the callback.This is a bit of a hack since the function name could potentially change over time or may be unavailable if the runtime was statically linked. But we use it for now to make the debugger experience better until we can find a more permanant solution.