[0/2] Fix debugging multi inferiors using the ROCm runtime

Message ID 20230630145755.6500-1-lancelot.six@amd.com
Headers
Series Fix debugging multi inferiors using the ROCm runtime |

Message

Lancelot SIX June 30, 2023, 2:57 p.m. UTC
  Hi,

This series fixes an issue seen when debugging multiple inferiors which
use AMDGPU devices.  This problem appears on systems using GPUs capable
of debugging multiple processes simultaneously.

The first patch adds a helper method for the testsuite which checks if
all devices on the system support multi-process debugging.  The second
patch fixes the multi inferior issue and adds a testcase to exercise the
problem.

All feedbacks are welcome.

Best,
Lancelot.

Lancelot Six (2):
  gdb/testsuite/rocm: Add the hip_devices_support_debug_multi_process
    proc
  gdb/amdgpu: Fix debugging multiple inferiors using the ROCm runtime

 gdb/amd-dbgapi-target.c                       |   6 +-
 gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp | 111 ++++++++++++++++++
 gdb/testsuite/gdb.rocm/multi-inferior-gpu.exp |  86 ++++++++++++++
 gdb/testsuite/lib/rocm.exp                    |  20 ++++
 4 files changed, 221 insertions(+), 2 deletions(-)
 create mode 100644 gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp
 create mode 100644 gdb/testsuite/gdb.rocm/multi-inferior-gpu.exp


base-commit: 69933be89fe5002d2d541ecf2145d5ccac19bbac