cuda-gdb "No CUDA devices" but CUDA programs run

I’ve been trying to use cuda-gdb to debug problems with a simulation I’m running, but whether in X or booting straight to a command line, cuda-gdb doesn’t seem to recognize that there is a CUDA device and, hence, won’t step into device kernels, even though the program runs. What can I do to go about remedying this issue?

Do you have 2 GPU’s in the system? You cannot use cuda-gdb on the same device that is running the display.

There is only one gpu on the system, and I have this problem even when X is not started.

I’d also thought that when X is started, cuda-gdb should detect the gpu that is running X, even if it won’t allow programs to be debugged on it. Is that not the case?

I’m not certain as I’ve always had a second card running the display.

Have you compiled with the flags -g -G?