Cannot debug inside GPU

Hi, I need help with debugging with cuda-gdb. When I compile my code with -g and -G options it works fine, no error, nor warnings; but when I try to step into the kernel with cuda-gdb, it says that the function has no line information. If I remove parts of the code it works fine, I can single step and print any variable, etc.

Is there a limit to the number of debug symbols or something like that?

Forgot to tell, I’m using a 9400 GT graphic card (compute capability 1.1), don’t know if that is meaningful.

Thanks.


Please, I really need help with this. Does any one had this problem? If there is any other information you need about this issue, let me know.

I’ve been working on the code and I think I know what causes the problem, but I don’t know why. I have many device functions and all of them receive arguments passed by reference. I’ve been removing arguments that are not necessary, like global variables, that I can read directly from inside the function, and it seems to work. Nevertheless, I don’t understand why cannot the compiler or the debugger show those symbols. There seems to be a limit on the number of symbols it can keep track of or something.

Can anybody confirm this, or has seen any similar behavior?

Thanks

I’ve been working on the code and I think I know what causes the problem, but I don’t know why. I have many device functions and all of them receive arguments passed by reference. I’ve been removing arguments that are not necessary, like global variables, that I can read directly from inside the function, and it seems to work. Nevertheless, I don’t understand why cannot the compiler or the debugger show those symbols. There seems to be a limit on the number of symbols it can keep track of or something.

Can anybody confirm this, or has seen any similar behavior?

Thanks

I’ve noticed something else, it seems that the kernel is not launched on the device, like if I had compiled with -deviceemu option, which I haven’t. When I set a breakpoint at kernel and run the application (inside cuda.gdb) it says something like “Switching to thread xxxxxxxx [LWP 2933]”. Isn’t it a CPU thread?

I repeat, if I suppress parts of the code, in order to make it smaller, I have no problems, I can break into the kernel, single step through it, and print any variable to see its value. Please, I’m stuck. I could upload the whole code if that help, but as I said before, its to long.

I’ve noticed something else, it seems that the kernel is not launched on the device, like if I had compiled with -deviceemu option, which I haven’t. When I set a breakpoint at kernel and run the application (inside cuda.gdb) it says something like “Switching to thread xxxxxxxx [LWP 2933]”. Isn’t it a CPU thread?

I repeat, if I suppress parts of the code, in order to make it smaller, I have no problems, I can break into the kernel, single step through it, and print any variable to see its value. Please, I’m stuck. I could upload the whole code if that help, but as I said before, its to long.