User forums > Using Code::Blocks

gdb doesn't find sources ( No source file named...)

<< < (3/4) > >>

Belgabor:

--- Quote from: erSitzt on February 17, 2008, 05:54:20 pm ---I had this problem too, but with breakpoints in the cpp files and i also had problems with the debugger starting the wrong build target.

--- End quote ---

I also had that problem and figured out that (at last in my case) the problem was that my release and debug binary differed by " d" (and were in the same directory). The space seems to throw something off, CB reliably started my release binary claiming happily it was the debug target. As soon as I removed the space (ie just added "d" for the debug binary), everything worked as it should.

lapique:
I have the same problem since I moved some files :
projdir\src --> projdir\..\common\src
projdir\include --> projdir\..\common\include

When I manually run gdb in a DOS shell and type "directory projdir\..\common\src" and set the same breakpoint manually, it DOES work.

So, the problem is that C::B does not actually add source directories as it should (and as it claims it does) !

killerbot:

--- Quote from: thomas on February 17, 2008, 07:08:52 pm ---About the constructor thing I am not sure, it may either that either the model was changed in gcc 4.x or the more recent gdb contains a kind of workaround.
The reason why breakpoints on constructors do/did not work is that gcc 3.x always emits two separate constructors, and gdb can't figure out which one to break in. So it is kind of normal, rather than a bug.

If this works for you now, then that's good news (and a sign that I should soon update my compiler/debugger). :)

--- End quote ---
no idea if gcc4.x or latest gdb, but it does work for some time now : breakpoints in the constructor

lobby:
i had the same problem, it happened after i have moved the project folder (like lapique),
i tried to rebuild many times etc... but it didn't work.

After a while, i have deleted the obj directory (containing debug and release directories for object files)
and after the rebuild, all was fixed.

I don't know exactly if that was a bug or not (i think it was), the only thing i changed in my project, is that the debug and release .exe file ouput in the same directory.

lobby:
i tried to move headers in another folder in a "../" directory, and i get the bug back :/
deleting obj directory don't change anything that time, i really have no idea how it has been fixed the first
time.

the strange thing is that i have other projects with some includes in "../" and it works fine, maybe because i have never moved those headers since projects have been created or something like that

someone have an idea to locate/fix the bug ?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version