In any case, after about 5 weeks of trying to use this feature it's only worked in a handful of cases.
[...]
Am I doing something wrong?
Apart from the problem I described in this thread, one of my major problems was that I could never (well, almost never) get break points to work satisfactorily with C::B and Cygwin. Eventually, this caused me to abandon both technologies. However, fogged by the mists of time, I decided yesterday to revisit them both.
As often happens when one abandons a tool and comes back to it much later, the reason for the original problem now seems blindingly obvious. Let's say I was debugging a project and wanted to set a breakpoint in the following source module:-
F:\MyProj\libs\soundtouch\FifoSampleBuffer.cppIt's important to remember that when using C::B with Cygwin, you have to use the Windows build of C:B. Naturally, this interprets the above as a DOS-style path. However, you're trying to debug your app using Cygwin/gdb which (also naturally) has no understanding of DOS paths. This causes the debugger to fail when trying to set a break point in the above module. For Cygwin/gdb to work, the path would have to be passed to it in the form:-
/cygdrive/f/MyProj/libs/soundtouch/FifoSampleBuffer.cppHow simple would it be for C::B to carry out this conversion automatically? In other words if the selected compiler was Cygwin/gcc, DOS-style paths would get intelligently converted to Cygwin-style paths before being sent to the debugger. As another example, if I tried to set a break point in
C:\cygwin\home\johne53\MyProj\SomeSourceFile.cpp (and the selected compiler was Cygwin gcc) C::B would intelligently convert the path to its Cygwin equivalent (namely,
/cygdrive/c/cygwin/home/johne53/MyProj/SomeSourceFile.cpp) before sending it to gdb.
I can't be 100 percent certain but my gut instinct is that this would solve a major incompatibility problem between CodeBlocks and Cygwin. Also, I'd be happy to beta test this change if the dev team thinks it might be worth trying.