User forums > Using Code::Blocks
GDB (cygwin-special) Warning: /cygdrive/... No such file or directory
littlegene:
Hello, guys.
the real trouble with cygwin and C::B is not in building cygwin projects and running them with C::B, but in debugging them...
I have no idea why C::B developers do not hesitate to install modern Cygwin 1.7 (with not any "Cygnus Solutions" terms in registry) at themselves and fix all the debugging troubles on different gdbs within Cygwin package. Maybe because Cygwin (absolutely fine tool for many tasks) is mistakenly undervalued. Vain.
Suppose, the cygwin 1.7 (installed on C:) debugging with gdb 6.8 on pure C::B 10.05 (with no svn modifications) perfectly works on XP (concerning to debugging ability itself, not counting incorrect behaviour in some cases)
But the same 'combination' on Windows 7 does not monitor for ex. the yellow triangle on current lines and breakpoints (with no auto-switching files in debug mode) however allowing debugging itself and capable of watching variables.
Now in Cygwin there is gdb 7.0 (2,3) debugger and no C::B revisions (up to 7728) capable of debugging with it. Neither on XP, nor W7.
So I still use 6.8 for debugging in C::B and have a little complicated debug process.
Can I ask you, if you have the same set of tools, then where is the possible temporary patches for debugging to work.
thanks a lot.
./ET
oBFusCATed:
Here is the patch: http://forums.codeblocks.org/index.php/topic,15136.msg106378.html#msg106378
If it works, I'm OK to commit it.
littlegene:
Hello. Thank you for reply.
I applyed the patch to what was fetched from svn://svn.berlios.de/codeblocks/branches/wxpropgrid_debugger.
(I applied the patch to http://svn.berlios.de/svnroot/repos/codeblocks/trunk as well, but I could not succeed, maybe due to my own fault)
The result is gdb version 7 now can be used for debugging as well as an older gdb 6.8! But, still, stepping through source code in editor is impossible (no yellow triangle of breakpoint, no current line of debug). However watch windows depict variables correctly: 'a' is out of range, while 'aa' is 9. After breakpoint on 13th line, I pressed F7 2 times.
Right underneath is the screen shot of: C::B on Windows7, gdb7.3, cygwin 1.7.X
I will try to check it on WinXP later.
oBFusCATed:
Enable the full log in the debugger's settings and post it here (using code tags). Screenshots are useless.
littlegene:
--- Code: ---Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Boost\bbb\
Adding source dir: C:\Boost\bbb\
Adding file: C:\Boost\bbb\bbb.exe
Changing directory to: C:/Boost/bbb/.
[debug]PATH=.;C:\Cygwin\bin;C:\Program Files\Borland\Delphi7\Bin;C:\Program Files\Borland\Delphi7\Projects\Bpl\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Qt\4.5.0\bin;C:\Program Files\Bazaar;C:\CodeBlocks\MinGW\bin;C:\CodeBlocks\MinGW\mingw32\bin;C:\Program Files\TortoiseSVN\bin
[debug]Command-line: C:\cygwin\bin\gdb.exe -nx -fullname -quiet -args C:/Boost/bbb/bbb.exe
[debug]Working dir : C:\Boost\bbb
Starting debugger: C:\cygwin\bin\gdb.exe -nx -fullname -quiet -args C:/Boost/bbb/bbb.exe
done
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
[debug]Reading symbols from /cygdrive/c/Boost/bbb/bbb.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.3.50.20111026-cvs (cygwin-special)
[debug]Copyright (C) 2011 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "i686-cygwin".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.3.50.20111026-cvs (cygwin-special)
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set debugevents on
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\Users\eugene\Desktop\deb_branch\src\output\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/Boost/bbb/
[debug]Warning: /cygdrive/c/Boost/bbb/C: No such file or directory.
[debug]Warning: /Boost/bbb: No such file or directory.
[debug]>>>>>>cb_gdb:
Warning: /cygdrive/c/Boost/bbb/C: No such file or directory.
[debug]> break "/cygdrive/c/Boost/bbb/main.cpp:13"
[debug]Breakpoint 2 at 0x4011d3: file C:/Boost/bbb/main.cpp, line 13.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]gdb: windows_init_thread_list
Child process PID: 4188
[debug][New Thread 4188.0x106c]
[debug][New Thread 4188.0x11ac]
[debug]Breakpoint 2, _fu1___ZSt4cout () at C:/Boost/bbb/main.cpp:13
[debug]->->/cygdrive/c/Boost/bbb/main.cpp:13:190:beg:0x4011d3
[debug]>>>>>>cb_gdb:
Cannot open file: ->->/cygdrive/c/Boost/bbb/main.cpp
At ->->/cygdrive/c/Boost/bbb/main.cpp:13
[debug]> set debugevents off
[debug]>>>>>>cb_gdb:
Continuing...
[debug]> cont
[debug][Inferior 1 (process 4188) exited normally]
[debug]>>>>>>cb_gdb:
[Inferior 1 (process 4188) exited normally]
[debug]> quit
Debugger finished with status 0
--- End code ---
So now I pressed F8. After breakpoint on 13 line I pressed F8 again to continue.
In the log above I changed (by hand) 2 symbols (2 little arrows - see the red text on screenshot above ) to '->->'. Without that the log cannot be posted via code tags.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version