News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

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

Started by Azra, February 17, 2008, 02:54:28 PM

Previous topic - Next topic

MortenMacFly

Quote from: lobby on April 16, 2008, 01:58:46 AM
someone have an idea to locate/fix the bug ?
Did you foget to re-compile your project after you have moved the header files?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

lobby

#16
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.next.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 ;(