Bug #17626 2010-10-18 06:25
tfga
Debugging doesn't work with cygwin
As already described in this topic in the forum
http://forums.codeblocks.org/index.php?topic=12212.msg90788;topicseen
, the debugger front-end doesn't work with cygwin. The reason is that cygwin's gdb expects UNIX paths -- and Code::Blocks is sending it Windows paths. Cygwin comes with a tool for converting between Unix and Windows paths called 'cygpath'[1]. When Code::Blocks wants to send a path '$path' to gdb, it should send instead
$(cygpath "$path")
, i.e. the output of 'cygpath "$path"' ('$path' should be between quotes because it can contain spaces).
----
[1] http://cygwin.com/cygwin-ug-net/using-utils.html#cygpath
- Category
- Debugger
- Group
- Status
- Open
- Close date
- Assigned to
History
Yea, this is a question, and could you use the mingw gdb ( http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GDB/GDB-7.2/ ) ?
Made it work on 26th of august nighty + cygwin 7.15.
Somehow, it goes wrong with HKLM, You might try to add following to Your registry:
[code]
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2]
"cygdrive prefix"="/cygdrive"
"cygdrive flags"=dword:00000022
[/code]
- just changed root to HKCU.
If somebody continues issuing this bug - I suggest You to download ProcessMonitor and look through if it even try to read some values.
Commenting on this situation, as of some 7.15 version of cygwin, it doesn't store drive mounting details in registry anymore, the above workaround is not a solution. Neither that gaming with regstry ever was, in my opinion.
`cygpath "$path"` stays cool here, just like tfga said.
I hope on implementation of checkbox in debugger configuration - something like "Oh i'm using that cygwin's gdb" and path to cygpath prompt there.