Search code examples
c++eclipsecygwin

eclipse cygwin source path mapping not working


I'm trying to debug some C++ projects in eclipse using the Cygwin tool chain and I'm having trouble placing breakpoints due to source file not being found. I've seen the solution to use a path mapping /cygdrive/c => C:\ in a number of places, however, this is not working for me. It still fails with the same "cygdrive/c/...../file.cpp" not found errors. I tried it on Mars, Luna, and Kepler, so my setup must be missing something else basic.

I'm creating my eclipse projects as Makefile projects after having generated the makefiles separately using cmake -G "Unix Makefiles". I've tried both in-source and out-of-source builds with same effect. Everything builds fine and debug executable runs, it just won't let me insert breakpoints because the path mapping is failing for some reason.

I'm running on 64bit Windows 7 Enterprise.


Solution

  • Silly me, I wasn't building with debug information. I set CMAKE_BUILD_TYPE to Debug and that solved this problem.