User forums > Embedded development
gdb can't find sources
Joerg:
Hi,
it's not necessarily related to C::B but maybe someone around here can help.
I'm not able to set breakpoints anymore because gdb says
No source file named D:/Projekte/icps-sw/src/mmc.c.
Some testing showed that cygdrive/d/... works.
Seems like this arm-elf-gdb was compiled for cygwin.
Typing 'list keyboard.c:0' as user command works too.
I there an option to tell codeblocks not to use absolute paths to set beakpoints?
Using no path at all shoul work too.
Joerg
Joerg:
hmm,
when i copy the sources in my project path it works.
Even though the path is absolute too.
It seems more to be a problem if the sources are in a different directory.
We got them relatively under ../../src.
I can copy the sources in my project dir temporary but
that is not a stable solution.
grrrr.....
jomeggs:
Hi,
if I understood correctly, you've copied the sources to another destination before debugging. In this case, a complete rebuild will help.
Joerg:
No,
I copied them to my local project source to
be able to debug them! ;-)
we organized our sources like:
/proj/myprojects
/src
Where the main/common sources lies under src
and my local project under proj.
I think its a gdb/c::b problem because when I type
'list source.c:0' in the gdb command line I can
see the source and set breakpoints.
Regards,
Joerg
mariocup:
Hi rekisum,
I observed that if you switch between different CB projects then sometimes the working directory is not correct, but I did not find a way to reproduce it. But perhaps this could be your problem. Just use the command pwd in the debugger to see if the working directory is correct. You could even force the debugger to use a certain working directory with the comannd line option --cd=<workingdir>. This fixed my problem with an external debugger.
Bye,
Mario
Navigation
[0] Message Index
[#] Next page
Go to full version