Hi,
I am trying to debug the cuda source file compiled using nvmex with “-g”
option embedded in the option file.
I get the compiled code with debug information without any error, but when I try to
debug it (using gdb, dbmex on), it never finds the source file.
Following are the commands to get the object code with debug information.
→ nvcc -c -I/opt/CUDA/cuda/include -I/remote/atg/matlab7p2_R2006a//extern/include -I/remote/atg/matlab7p2_R2006a//simulink/include -DMATLAB_MEX_FILE -Xcompiler “-fPIC -D_GNU_SOURCE -pthread -fexceptions -m64” -DMX_COMPAT_32 -Xcompiler “-g” dummy.cu
→ nvcc -c -I/opt/CUDA/cuda/include -I/remote/atg/matlab7p2_R2006a//extern/include -I/remote/atg/matlab7p2_R2006a//simulink/include -DMATLAB_MEX_FILE -Xcompiler “-fPIC -D_GNU_SOURCE -pthread -fexceptions -m64” -DMX_COMPAT_32 -Xcompiler “-g” /remote/atg/matlab7p2_R2006a//extern/src/mexversion.c
→ gcc -g -pthread -shared -Wl,–version-script,/remote/atg/matlab7p2_R2006a//extern/lib/glnxa64/mexFunction.map -o dummy.mexa64 dummy.o mexversion.o -L/opt/CUDA/cuda/lib -lcudart -Wl,-rpath,/opt/CUDA/cuda/lib -Wl,-rpath-link,/remote/atg/matlab7p2_R2006a//bin/glnxa64 -L/remote/atg/matlab7p2_R2006a//bin/glnxa64 -lmx -lmex -lmat -lm -lm -lstdc++
thanks,