I have compiled a library (libssrcDE) for emulation mode with debugging symbols:
nvcc -o obj/debug/ssrc.cu_o -c ssrc.cu -g -G -D_DEBUG -deviceemu -I. -I/usr/local/cuda/include -I…/…/common/inc -DUNIX
g++ -fPIC -shared -Wl -o …/…/lib/libssrcDE.so obj/debug/ssrc.cu_o -L/usr/local/cuda/lib -L…/…/lib -L…/…/common/lib -lglut -lparamgl -lgsl -lgslcblas -lcudart -lGL -lGLU -lglut -lGLEW -L/usr/local/cuda/lib -L…/…/lib -L…/…/common/lib -lglut -lparamgl -lgsl -lgslcblas -g
and an executable (ssrcDE) which calls this library:
g++ -fPIC -o …/…/bin/linux/emudebug/ssrcDE ssrcMain.c -L/usr/local/cuda/lib -L…/…/lib -L…/…/common/lib -lglut -lparamgl -lssrcDE -lcudart -lGL -lGLU -lglut -L/usr/local/cuda/lib -L…/…/lib -L…/…/common/lib -lglut -lparamgl -lssrcDE -lcutilD -g
When I debug with gdb I can step into the library code, but not the kernel functions:
__device_stub__Z11wssrcKernelPhS_PfS0_iii (__par0=0x808a800 “\001”,
__par1=0x808a800 “\001”, __par2=0x808c700, __par3=0xb68d1100, __par4=239,
__par5=239, __par6=10) at /tmp/tmpxft_00002b3c_00000000-0.stub.c:73
73 /tmp/tmpxft_00002b3c_00000000-0.stub.c: No such file or directory.
in /tmp/tmpxft_00002b3c_00000000-0.stub.c
What am I doing wrong? (or is it not possible to step into kernel functions?)