Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GDB debugger problems - No source file named

Tags:

c++

c

debugging

gdb

For some reason I can't get gdb to recognize the files in my project when debugging. I've tried a variety of things, including downloading different version, etc. and the last thing I did was completely overwrite all of MingW with Twilight Dragon Media's Bundle Package.

Does anyone know how to solve this issue? The odd thing was that when I first started using it, it was working fine, and then it suddenly stopped working.

I'm using Code::Blocks and I have the -g checked for the debug version of the project. I'm running on Windows Vista.

like image 706
Anonymous Avatar asked Jan 23 '23 23:01

Anonymous


1 Answers

GDB locates source files by file path/name from the object module debug information. So if you moved your sources you should rebuild your project. This can also happen if you are running on a different host which has no visibility to your source at all.

The most important thing to remember is:

  • Debug information doesn't contain the source itself, but only the path where to find it. People often don't know this.
like image 188
Roman Nikitchenko Avatar answered Feb 03 '23 06:02

Roman Nikitchenko