User forums > Embedded development
GDB path problem
Jenna:
--- Quote from: jens on December 01, 2008, 04:35:14 pm ---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.
--- End quote ---
As I wrote before you need absolute path at compile-time, but you use a makefile.
That means not C::B generates the commands, but make does it using the information of the makefile.
Therefore C::B can not set the absolute path.
To avoid the problem, you either have to change your makefile manually, or try to switch the whole project to a real C::B project.
Joerg:
Hi Jens, rhf,
thanks for replying so quickly.
If I change the paths in the makefile to absolute paths breakpoints work! :P
But I don't get the point here.
GDB on command line doesn't seem to need absolute paths.
So why does C::B need them, and where?
There is a nice mix of back and forward slashes also,
as mentioned by rhf:
--- Code: --->>>>>>cb_gdb:
> break "D:/Projekte/icps-sw/src/error_handler.c:1235"
Breakpoint 2 at 0x6c00: file D:\Projekte\icps-sw\src/error_handler.c, line 1235
--- End code ---
I can not switch to a C::B controller project, but I can
live with this absolute path workaround.
Jenna:
--- Quote from: rekisum on December 02, 2008, 10:35:16 am ---There is a nice mix of back and forward slashes also,
as mentioned by rhf:
--- Code: --->>>>>>cb_gdb:
> break "D:/Projekte/icps-sw/src/error_handler.c:1235"
Breakpoint 2 at 0x6c00: file D:\Projekte\icps-sw\src/error_handler.c, line 1235
--- End code ---
--- End quote ---
The first line is the command C::B sends to the debugger, the second one is the answer from gdb.
About the problem with the absolute path:
I played a little bit:
If a prgram is compiled with absolute paths, gdb also needs them and if you compile it with relative paths gdb only works if you set the bp with relative path, too.
No time to go deeper in it at the moment (have to work for money a little bit now).
Joerg:
--- Quote ---No time to go deeper in it at the moment (have to work for money a little bit now).
--- End quote ---
Thanks anyway.
--- Quote ---If a program is compiled with absolute paths, gdb also needs them
and if you compile it with relative paths gdb only works if you set the bp with relative path, too.
--- End quote ---
I don't see any working option to set breakpoints with relative paths in C::B.
Looking at the .elf file I can see the paths changed from relative to absolute.
Maybe it's just a problem where to start GDB?
BTW:
Any news about the fact that it's not possible to send a 'break' command to GDB under Windows?
I think someone wanted to add a button issuing a telnet command.
mariocup:
Hi,
in the executables of embedded targets debug information normally contains relative paths, but CB uses absolute pathes to set e.g. breakpoint. Under Linux this is not a problem, since no drive letter are used and setting breakpoint with absolute paths works. Under windows however currently it is not possible to debug files (like setting breakpoints) correctly. Is there a CB setting or workaround available for setting breakpoints with a relative path?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version