ROCm / ROCgdb

This is ROCgdb, the ROCm source-level debugger for Linux, based on GDB, the GNU source-level debugger.
https://rocm.docs.amd.com/projects/ROCgdb/en/latest/
GNU General Public License v2.0
50 stars 9 forks source link

When using rocgdb, breakpoints cannot be set inside the kernel function and cannot enter the kernel #16

Open ccnankai opened 2 years ago

ccnankai commented 2 years ago

Hi, The rocm-5.2.1 installation package does not contain rocgdb by default,,so users have to compile and install it themselves.

step1:

I used the following config options:

_../configure --program-prefix=roc \ --enable-64-bit-bfd --enable-targets="x8664-linux-gnu,amdgcn-amd-amdhsa" \ --disable-ld --disable-gas --disable-gdbserver --disable-sim --enable-tui \ --disable-gdbtk --disable-gprofng --disable-shared --with-expat \ --with-system-zlib --without-guile --with-babeltrace --with-lzma \ --with-python=python3

step2: Use the hipcc command with the -g option to generate the executable file

step3: Run rocgdb

rocgdb ./bit_extract

(gdb) b 12

error:no comiled code for line 12 .....

image

Which step is wrong?

bohemondcouka commented 2 years ago

Hi, Are you sure you have ROCgdbapi installed? I remember I had a similar issue with a custom ROCgdb installation, and I forgot to specify the ROCdgbapi path. You can find more information about how to properly compile ROCgdb here.

t-tye commented 2 years ago

By default, the HIP runtime does not load the code objects for device code until a kernel is actually launched. This means you either need to set pending breakpoints, or disable the deferred code object loading. See the restriction described in item 11 in section "22.4.10.16 AMD GPU Restrictions" of the ROCgdb User Manual installed at /opt/rocm/share/doc/rocgdb/rocgdb.pdf .

ppanchad-amd commented 2 months ago

@ccnankai Do you still need assistance with this ticket? If not, please the close ticket. Thanks!