Author Topic: cygwin: breakpoints and file mappings...  (Read 3106 times)

mag

  • Guest
cygwin: breakpoints and file mappings...
« on: May 12, 2007, 02:07:26 am »
hi,
just installed c:b, imported my current project and evrything runs smooth :)

except debugging and setting breakpoints using cygwin;
for various reasons, i have to use cygwin, but there seem to be problems with the path mappings;

i'm using svnrev 3948 (fron nightly builds) and gdb 6.5.50 from cygwin distribution;
in cygwin, i've got a 'mount c:\ /c' to map the system drive into cygwin filesystem, my project
is located in CBlocks/xgame; 

when i set a breakpoint in my 'main.cpp' i get the following:

Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug
Adding source dir: C:\CBlocks\xgame\
Adding source dir: C:\CBlocks\xgame\
Adding file: bin\Debug\xgame.exe
Starting debugger: done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.5.50.20060706-cvs (cygwin-special)
Cannot open file: C:\CBlocks\xgame\CBlocks\xgame\main.cpp
At :CBlocks/xgame/main.cpp:18


and although gdb stops, the source location is not displayed, cause ':\CBlocks\xgame\CBlocks\xgame\main.cpp' is an invalid path.
there is a debugger option 'Use full Paths for source files' which i believe has somthg to do with this isssue, but it doesnt seem to help..

when i create a directory join from 'C:\CBlocks\' to 'C:\CBlocks\xgame\CBlocks' (kind of a hardlink for directories, for the *nix users reading this) c:b opens the file just fine, line stepping is working as well, but since a _different_ file is opened in the editor pane, setting breakpoints there doesnt do any good :-/
and c:b gets pretty confused if i change something in the hardlinked source, since 'source is modified outside editor'..

i tried to fiddly around with the 'debugger source directory' settings as well, without luck.

any help would be highly appreciated...

for those wanting to try the 'directory join' hack, i'm attaching the ln.exe utility i was using, since its no standard command.



[attachment deleted by admin]

mag

  • Guest
Re: cygwin: breakpoints and file mappings...
« Reply #1 on: May 12, 2007, 06:16:29 am »
edit: i noticed this topic has been discussed before:
http://forums.codeblocks.org/index.php/topic,4850.0.html

i guess i'll have build myself and do some debugging to see whats going on :)