User forums > Embedded development
GDB path problem
Joerg:
Hi,
seems like embedded development is not in the focus
of the codeblocks community. :?
For a long a long time now I can not use codeblocks
for remote debugging because of a annoying bug.
Trying to set a breakpoint always results in an error like:
> break "D:/Projekte/icps-sw/src/error_handler.c:1235"
No source file named D:/Projekte/icps-sw/src/error_handler.c.
Seems like GDB has problems with the absolute path?
Changing the advanced setting
'Use full path for source files (GDB workaround)'
does not change anything.
Running GDB from command line works.
Greets,
Joerg
Jenna:
--- Quote from: rekisum on December 01, 2008, 10:30:57 am ---> break "D:/Projekte/icps-sw/src/error_handler.c:1235"
No source file named D:/Projekte/icps-sw/src/error_handler.c.
Seems like GDB has problems with the absolute path?
--- End quote ---
This message is normal, if the library the source belongs to is not loaded at startup.
Can you provide a small test-project where the error occurs ?
If it's too big, or you have to (want to) send the full project, you can send it via E-Mail (should be shown in profile, if not on my website).
Which versions of gcc, gdb and C::B do you use ?
--- Quote from: rekisum on December 01, 2008, 10:30:57 am ---Changing the advanced setting
'Use full path for source files (GDB workaround)'
does not change anything.
--- End quote ---
If the source is on another drive, the relative and the absolute path are identical.
Joerg:
Hi Jens,
thanks for reply.
--- Quote ---Can you provide a small test-project where the error occurs ?
--- End quote ---
I sent a demo project to the address I found on your website, starting with debian.
--- Quote ---Which versions of gcc, gdb and C::B do you use ?
--- End quote ---
It's one of the last Yagarto toochains:
GCC 4.2.2
GDB 6.8.50
--- Quote ---If the source is on another drive, the relative and the absolute path are identical.
--- End quote ---
It's not on another drive but on level up(../).
You should get the error if you try to set a beakpoint in
file sub.c of my demo project.
I would choose another code organization next time,
but as GDB on command line can deal with it..
Jenna:
Hi Joerg,
downloading the toolchain wil need about 1:30 hours (I am at home and we still get nothing faster than ISDN :cry: ), but a short look on the Build options show me a missing "-g" option.
Does this only happen accidently for this (demo) project ?
If not this is most likely causing your problems.
And you definitely have to turn on "Use full paths for source files (GDB workaround)".
I tested it with a similar constellation (source-file of a dll one level below projects root-dir).
Otherwise gdb silently ignores the breakpoint. (Except for the message about pending breakpoint).
The full path is needed at compile time, not while debugging, so you don't see a difference in debuggers debug-log.
rhf:
This may not be applicable, but I thought I should mention it.
http://forums.codeblocks.org/index.php/topic,9295.msg66321.html#msg66321
and see tdragon's comment on
http://sourceforge.net/tracker/index.php?func=detail&aid=2145427&group_id=200665&atid=974439
Navigation
[0] Message Index
[#] Next page
Go to full version