Cuda-gdb client via the gdb/mi interface

I’m debugging the following program using cuda-gdb 12.8:

#include <cstdio>

__global__ void kernel() {
  printf("ok\n"); //break
  printf("ok\n");
}

int main() {
  kernel<<<1, 1>>>();
  cudaDeviceSynchronize();
  return 0;
}

It looks like stepping via gdb/mi doesn’t work. When the breakpoint is reached, cuda-gdb reports that the program is stopped on thread-id=1:

<*stopped,CudaFocus={device="0",sm="0",warp="0",lane="0",kernel="0",grid="1",blockIdx="(0,0,0)",threadIdx="(0,0,0)"},reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x0000000701a4e610",func="kernel",args=[],file="/home/nd/w/a/CLionProjects/cuda-test/main.cu",fullname="/home/nd/w/a/CLionProjects/cuda-test/main.cu",line="4",arch="m68k"},thread-id="1",stopped-threads="all",core="10"

An attempt to step to the next line using the -exec-next command fails with the error:

>38-exec-next --thread 1
<38^error,msg="Cannot find bounds of current function"

Is it possible to use cuda-gdb via gdb/mi interface? If it is possible, what commands should be used?

Hi, @dmitry.neverov

Thanks for using cuda-gdb. Regarding to gdb/mi interface, our dev plan on documenting this in the future but at the moment it is not officially supported.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.