Author Topic: gdb doesn't find sources ( No source file named...)  (Read 12953 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: gdb doesn't find sources ( No source file named...)
« Reply #15 on: April 16, 2008, 08:33:30 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline lobby

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: gdb doesn't find sources ( No source file named...)
« Reply #16 on: April 16, 2008, 03:18:22 pm »
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

« Last Edit: April 16, 2008, 03:33:31 pm by lobby »

Offline lobby

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: gdb doesn't find sources ( No source file named...)
« Reply #17 on: April 21, 2008, 04:54:24 am »
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 ;(