First off, let me start by saying C::B is awesome!
I've been using it for some time now for a cross-platform project.
Unfortunately, I've encountered some problems debugging on the Mac (debugging works great under XP & Ubuntu). I ran into the "
No source file named <blah>" issue, which appears in several threads on the forum. However, I've ruled out the common causes (no debug symbols, -fullname not set, etc.) and dug a little deeper. The issue is actually due to how the C::B debugger plugin passes break command strings to GDB (or an alternate view could be how GDB fails to interpret the strings correctly). C::B passes the source file names along with absolute paths, and for some reason GDB doesn't like those absolute paths and insists that it can't find the files. I tested this outside C::B and can produce the same results from GDB.
E.G.
gdb -nx -fullname -args someprogram
Reading symbols for shared libraries.... done
(gdb) break "/some/long/path/main.cpp:56"
No source file named /some/long/path/main.cpp
(gdb) break "main.cpp:56"
breakpoint 1 at 0x33d8: file main.cpp, line 56Why GDB isn't interpreting these paths correctly I don't know, but it doesn't. So either the C::B debugger plugin needs an option to pass "flat" filenames with no path or GDB needs to be fixed to interpret the paths correctly (I'll be posting on the GDB forums too
). Strangely enough, the same commands are passed on the other platforms and GDB doesn't have any problem with the absolute paths there.
FYI, I did try playing with the "Use Full Paths for source files" and "Use Flat Objects" options in the advanced settings, but neither seem to make any difference to the commands GDB is passed. I did find a workaround - Adding directories to the "Additional debugger search dirs". Unfortunately, this has to be done for every single source directory. Not a problem if you only have one source dir, but on large projects that's not the case. You have to add the nested dirs too for any source file you want to debug into. Then GDB can suddenly find them, despite the fact it's being supplied with absolute paths!
I'm more than happy to supply additional info if someone wants to try and fix this.
Cheers!
Tim