Skip to content

rocdbgapi: add a process id argument to convert_address_space - #10163

Open
aktemur wants to merge 4 commits into
developfrom
users/aktemur/convert-address-process-id
Open

rocdbgapi: add a process id argument to convert_address_space#10163
aktemur wants to merge 4 commits into
developfrom
users/aktemur/convert-address-process-id

Conversation

@aktemur

@aktemur aktemur commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Motivation

Add a process id argument to convert_address_space, so that generic -> global conversions can be made when wave is not available.

Technical Details

When a generic address points to the global address space, wave may not be available, since the address does not depend on a wave in that case. Accept a process id and use it. See the patches for more details.

Issue Tracking

JIRA ID: AIROCGDB-644

Test Plan

Tested by ROCgdb PR ROCm/ROCgdb#255.

Test Result

Pass.

@aktemur
aktemur requested a review from a team as a code owner August 14, 2026 10:35
@therock-pr-bot

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: projects/rocdbgapi/src/memory.cpp; no test file found
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

The name of an input parameter in the documentation of the
`amd_dbgapi_convert_address_space` function is incorrect.  Fix it.
Raise AMD_DBGAPI_STATUS_ERROR_INVALID_ARGUMENT_COMPATIBILITY in
amd_dbgapi_address_dependency if the wave given as argument does not
belong to the process.  This is a sanity check.
If a wave is not given, try all agents of the process to lower the
address.  For each lowered address, require PROCESS dependency.  This
helps us check dependency of generic addresses to the global address
space, which have to be lowered first before checking dependency.
Otherwise such generic addresses incorrectly raise an error in address
dependency.
Make amd_dbgapi_convert_address_space accept a process id as an
argument.  This is required to be able to convert generic addresses to
global addresses, in which case a wave may not be available.

To do the conversion, lower the address in every agent of the process.
For each, we must get the same answer for the conversion to the global
address space to be valid.

Before this change, converting a generic address to global without a
wave was giving an error.  After this change, conversion takes place
successfully.

AIROCGDB-644
@aktemur
aktemur force-pushed the users/aktemur/convert-address-process-id branch from e25474f to 2af3fee Compare August 18, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant