VOOZH about

URL: https://www.phoronix.com/news/GNU-Debugger-GDB-Intel-GPUs

⇱ Intel Engineers Adding GNU Debugger "GDB" Support For Intel GPUs - Phoronix


👁 Phoronix

Intel Engineers Adding GNU Debugger "GDB" Support For Intel GPUs

Written by Michael Larabel in Intel on 23 December 2024 at 06:25 AM EST. 3 Comments
Intel engineers are working on contributing upstream support to the GNU Debugger (GDB) for debugging software running on Intel GPUs.

Intel has been carrying GDB debugger support for Intel graphics within their downstream repository while in recent weeks have been working to add the support into upstream GDB, the widely-used debugger on Linux that is part of the GNU toolchain.
"We (Intel) would like to submit patches to enable fundamental debug support for Intel GPU devices. In the future, we plan to add more patches that improve the performance and the user experience. Those patches are already available in the downstream "Intel Distribution for GDB" debugger.
...
GPU threads operate in a SIMD (single instruction multiple data) manner: they are vectorized, where each lane (also known as "execution channel") executes the same instruction but using different data values. Lanes of the same thread execute in a lock-step movement. Displaying the value of a source program variable therefore requires not only a thread context but also a lane context. GDB currently does not have this knowledge built-in. Furthermore, some DWARF extensions are necessary to express data locations in a lane-relative way, which are currently under discussion of or to be submitted to the DWARF committee. Hence, with this submission, variables may appear with an error like "

More details on this Intel graphics debugging support for GDB can be found via this patch series.

👁 Intel Arc Battlemage graphics card


This Intel graphics debugging target depends upon the Intel oneAPI Level Zero Debug API and in turn the GNU Debugger focus appears to be largely focusing on Level Zero / SYCL workloads. The Intel graphics port for GDB currently comes in at around 11k lines of code.

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.