User forums > Using Code::Blocks

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

<< < (4/4)

MortenMacFly:

--- Quote from: lobby on April 16, 2008, 01:58:46 am ---someone have an idea to locate/fix the bug ?

--- End quote ---
Did you foget to re-compile your project after you have moved the header files?!

lobby:
i did a build=>clean then rebuild and that's not working (project compile fine but still breakpoint in header problem)
i tried to move headers in some other directories:

/myproject/macro/   => doesn't work (gdb: no file named etc...)
/myproject/src/       => same directory as source files, it works
/myproject/src/new  => another directory included in the src directory, it works

note:
#include "new/header.h" works
#include "../src/new/header.h" works only after clean/rebuild (not with simple build)

i didn't use my project since few weeks, but before #include "../macro/header.h" worked without problem
and the only change i think i have done is moving the entire project directory somewhere else

lobby:
i have read the topic about this "bug":
http://forums.codeblocks.org/index.php/topic,4850.msg38322.html

since its a gdb issue, there is 2 things that can make things work:
-setting breakpoints using the filename only, the problem is that if there is 2 identical files in the project, gdb set break on the first he'll find

-using "info sources" command to find the proper file path that gdb use
 it is not very clean but will work perfectly (and only breaks that return "no source file named etc.." will do that)

i have read that the last one was the best solution for gui, i don't know how others handle that but that would be nice to get it work properly :)

i hope there is no more problems like that with the last versions of gdb, it's disapointing to see this debugger having that kind of issue ;(


Navigation

[0] Message Index

[*] Previous page

Go to full version