Reputation: 31685
I did the following:
At this point I get the error message in the console
No source file named /home/oswald/Eclipse/CDT/Workspace/Project/path/to/header.h.
When I resume the programm, all my breakpoints are skipped. How can I get my breakpoints working?
Some additional notes:
header.h:257
(header.h
is in folder /home/oswald/Eclipse/CDT/Workspace/Project/path/to/
). gdb then honours this breakpoint./home/oswald/Eclipse/CDT/Workspace/Project/path/to/header.h:257
, I get the same message from gdb as when using Eclipse CDT.Upvotes: 0
Views: 1566
Reputation: 31685
As a workaround, I have written a shell script that generates a .gdbinit file that contains the appropriate directory entries:
#!/bin/sh
PROJECT=/home/oswald/Eclipse/CDT/Workspace/Project
find $PROJECT -name "*.h*" -o -name "*.c*" \
| sed 's:/[^/]*$::' \
| sort \
| uniq \
| sed 's/^/directory /' > $PROJECT/.gdbinit
and configured the Eclipse CDT to use that .gdbinit file.
Upvotes: 1