gdb/amd-dbgapi-target: Update xfer_partial to always use dbgapi

On the Windows platform, the entire "global" address space is not
mapped in the inferior memory.  For such configuration, part of the
global address space lives in GPU memory, and can only be accessed via
rocm-dbgapi.

This patch updates amd_dbgapi_target::xfer_partial so it always calls
into amd-dbgapi to access the global address space.  GDB will still be
called to access host memory using xfer_global_memory callback.

To be sure that the callback request is not routed back to dbgapi, the
xfer_global_memory callback is modified to route the request to
whichever target sits below the amd-dbgapi target on the target stack.

Co-Authored-By: Pedro Alves <pedro@palves.net>
Change-Id: I2d5ca46edf65e2dec3606d18f7ad1d22d0275a63
1 file changed