Can't use Xcode debuger ? Debugger report libcuda.dylib image not found

I have a project immigrated to Mac OS. I wrote the makefile and the program compiled and runs well in Mac OS.

Now we need to add some new feature, for easier debugging, I built a Xcode project. The program compiled and linked, it generate the target and the target runs good in MAC OS console.

But when I enter Xcode Debuger, try to track the programming, I got the following errors:

What’s wrong? :unsure:

I install and set the library path at /usr/local/cuda/lib/** , of course the compiler found the path and built the target.

Should I need to make a cuda lib copy under /Volumes/Builds/nv/build/rel/gpu_drv/r180/r180_00/drivers/gpgpu/bin/i386_Darwin_release/

Why gdb try to search dylib there? Where should I set the gdb search path?

Thanks.

UP

if you’re using 2.1, try upgrading to 2.2. there was a bug with the initial release of 2.1 in that it was missing the rpath for libcudart.dylib, which might cause the kind of behavior you’re seeing there.

I’ve had zero luck so far running the debugger with cuda code from Xcode. Breakpoints that I set never actually break. There might be a trick, but if there is, I haven’t found it. For now, I’ve been copying my code into a new c++ project, pulling out the CUDA specific parts, and debugging it that way (in the case of logic errors), and working with the linux debugger when I have to.