When I tried to set break point in device function defined in a header(.h) file in cuda-gdb using
(cuda-gdb) break a.h:10
(cuda-gdb) No source file named a.h
However, I can set break point in host function defined in a header(.h) file, as well as set break point in device function defined in a source(.cpp) file.
Here is how I compiled the source code:
nvcc -g -G -Xcompiler -rdynamic -x cu a.cpp
And a.h is included in a.cpp, i.e. #include “a.h”
May I know if I did something wrong?
FYI, CUDA installed on my server is CUDA 10.0.130. Device capability is 7.0. The OS is CentOS Linux release 7.6.1810, and the kernel version is 3.10.0-957.el7.x86_64.