I am using a newer CUDA version, so it my case it’s slightly different:
Type "apropos word" to search for commands related to "word"...
Reading symbols from not_debugable...
(cuda-gdb) b kernel
Breakpoint 1 at 0x7bb92: file /home/akravets/Downloads/cuda_gdb-master/libr/main.cu, line 5.
(cuda-gdb) run
Starting program: /home/akravets/Downloads/cuda_gdb-master/not_debugable
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff540b000 (LWP 1108879)]
[New Thread 0x7fffeffff000 (LWP 1108880)]
[Detaching after fork from child process 1108881]
[New Thread 0x7fffef2dd000 (LWP 1108891)]
[New Thread 0x7fffee438000 (LWP 1108892)]
[Switching focus to CUDA kernel 0, grid 1, block (0,0,0), thread (0,0,0), device 0, sm 0, warp 0, lane 0]
Thread 1 "not_debugable" hit Breakpoint 1, 0x00007fffc7036800 in kernel()<<<(1,1,1),(5,1,1)>>> ()
(cuda-gdb) next
Single stepping until exit from function _Z6kernelv,
which has no line number information.
0x00007ffff56ff338 in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
Anyway the main difference seems to be in the source mapping:
Reading symbols from debugable...
(cuda-gdb) b kernel
Breakpoint 1 at 0xadcd: file /home/akravets/Downloads/cuda_gdb-master/libr/main.cu, line 5.
(cuda-gdb) r
Starting program: /home/akravets/Downloads/cuda_gdb-master/debugable
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff540b000 (LWP 1108981)]
[New Thread 0x7fffeffff000 (LWP 1108982)]
[Detaching after fork from child process 1108983]
[New Thread 0x7fffef2dd000 (LWP 1108993)]
[New Thread 0x7fffee438000 (LWP 1108994)]
[Switching focus to CUDA kernel 0, grid 1, block (0,0,0), thread (0,0,0), device 0, sm 0, warp 0, lane 0]
Thread 1 "debugable" hit Breakpoint 1, kernel<<<(1,1,1),(5,1,1)>>> () at /home/akravets/Downloads/cuda_gdb-master/libr/main.cu:6
6 const auto thread_id = threadIdx.x + blockDim.x * threadIdx.y;
(cuda-gdb) info source
Current source file is /home/akravets/Downloads/cuda_gdb-master/libr/main.cu
Compilation directory is /home/akravets/Downloads/cuda_gdb-maste
Located in /home/akravets/Downloads/cuda_gdb-master/libr/main.cu
Contains 14 lines.
Source language is c++.
Producer is lgenfe: EDG 6.4.
Compiled with DWARF 2 debugging format.
Does not include preprocessor macro info.
Type "apropos word" to search for commands related to "word"...
Reading symbols from not_debugable...
(cuda-gdb) b kernel
Breakpoint 1 at 0x7bb92: file /home/akravets/Downloads/cuda_gdb-master/libr/main.cu, line 5.
(cuda-gdb) r
Starting program: /home/akravets/Downloads/cuda_gdb-master/not_debugable
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff540b000 (LWP 1109102)]
[New Thread 0x7fffeffff000 (LWP 1109103)]
[Detaching after fork from child process 1109104]
[New Thread 0x7fffef2dd000 (LWP 1109114)]
[New Thread 0x7fffee438000 (LWP 1109115)]
[Switching focus to CUDA kernel 0, grid 1, block (0,0,0), thread (0,0,0), device 0, sm 0, warp 0, lane 0]
Thread 1 "not_debugable" hit Breakpoint 1, 0x00007fffc7036800 in kernel()<<<(1,1,1),(5,1,1)>>> ()
(cuda-gdb) info source
No current source file.
We will work with the compiler team to get this resolved.