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:
>>>>>>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
I can not switch to a C::B controller project, but I can
live with this absolute path workaround.
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?
@mariocup
Nowadays, I'm doing some coding on breakpoints persistent. So, I read some source code of debuggerGDB.
http://forums.codeblocks.org/index.php/topic,10704.0.html
Now, I can confirm that all the file was recorded and used in "absolute path", you can see a screenshot ( I just debug codeblocks in codeblocks, :D, set a breakpoint in AddBreakpoint function)
(http://img26.imageshack.us/img26/881/16954704.png)
By ollydbg (http://profile.imageshack.us/user/ollydbg) at 2009-06-20
And
int DebuggerState::AddBreakpoint(const wxString& file, int line, bool temp, const wxString& lineText)
{
wxString bpfile = ConvertToValidFilename(file);
// do we have a bp there?
int idx = HasBreakpoint(bpfile, line);
// if yes, remove old breakpoint first
if (idx != -1)
RemoveBreakpoint(idx, true);
// create new bp
Manager::Get()->GetLogManager()->DebugLog(F(_T("add bp: file=%s, bpfile=%s"), file.c_str(), bpfile.c_str()));
DebuggerBreakpoint* bp = new DebuggerBreakpoint;
bp->type = DebuggerBreakpoint::bptCode;
bp->filename = bpfile;
bp->filenameAsPassed = file;
bp->line = line;
bp->temporary = temp;
bp->lineText = lineText;
bp->userData = FindProjectForFile(file);
return AddBreakpoint(bp);
}
But these file path can transfered from "absolute path" to "relative path". Which is the way I have done to save all the breakpoints in a XXXX.bps file near yourproject.cbp.
You can see the code in:
https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2775&group_id=5358
Thanks!