#1081225 gdb: enable AMD GPU support

Package:
gdb
Source:
gdb
Description:
GNU Debugger
Submitter:
Cordell Bloor
Date:
2024-09-10 15:24:01 UTC
Severity:
normal
#1081225#5
Date:
2024-09-09 17:43:39 UTC
From:
To:
Dear Maintainer,

There is basic support for debugging code running on AMD GPUs in
gdb 14 and later. Please consider enabling this support by adding
amd-dbgapi-dev to the Build-Depends on amd64. This will add a runtime
dependency on librocm-dbgapi0.

The configure script will build AMD GPU debugging support by default if
amd-dbgapi-dev is found, but you can use --with-amd-dbgapi=<auto,yes,no>
during configuration for more control.

I have only tested this functionality on amd64 and I'm uncertain if it
works on arm64 and ppc64el. There is no AMD KFD driver support for other
architectures, aside from those three.

Sincerely,
Cory Bloor

#1081225#10
Date:
2024-09-10 09:49:43 UTC
From:
To:
Hello Cordell,

I was about to push a change for this to git repo, however I have
noticed there are no ppc64el headers in the archive. Am I missing
something there?

https://packages.debian.org/unstable/amd-dbgapi-dev only lists amd64 and arm64.

Regards

#1081225#15
Date:
2024-09-10 15:20:43 UTC
From:
To:
Hi Cordell,

Is it sufficient to just add amd-dbgapi-dev to build-depends in
order to get a gdb with AMD GPU debugging support? I tried with
with `sbuild --dist sid gdb --add-depends=amd-dbgapi-dev`, the build
went fine, but then I can't use the commands mentioned on [1], eg.
`show amdgpu precise-memory` does not seem to work.

Is there anything else to be done in order to test the functionality?

Thanks,
  Emanuele

[1] https://sourceware.org/gdb/current/onlinedocs/gdb.html/AMD-GPU.html