User forums > Using Code::Blocks
Debugger doesn't work anymore
Curlz:
I'm pretty sure it's just a minor issue, but I'm struggling for a day now to get the debugger running again.
I changed some code yesterday resulting in some NaN results I don't understand yet -> debugger time.
When i want to debug my code a console opens in sleep mode, codeblocks tells me terminal/console closed (Detected that the terminal/console has been closed, do you want to stop the debugging session?) and I get the following debugger log
--- Code: ---Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/
Adding source dir: /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/
Adding file: /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/bin/Debug/FDTD-Toroidal
Changing directory to: /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/.
Set variable: LD_LIBRARY_PATH=.:
[debug]Command-line: /usr/bin/gdb -nx -fullname -quiet -args /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/bin/Debug/FDTD-Toroidal
[debug]Working dir : /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal
Starting debugger: /usr/bin/gdb -nx -fullname -quiet -args /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/bin/Debug/FDTD-Toroidal
done
[debug]Reading symbols from /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/bin/Debug/FDTD-Toroidal...
[debug]done.
[debug](gdb)
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
[debug]Queued:[tty /dev/?]
[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (Ubuntu 7.11-0ubuntu1) 7.11
[debug]Copyright (C) 2016 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 "x86_64-linux-gnu".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (Ubuntu 7.11-0ubuntu1) 7.11
[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 disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Haltepunkt 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source /usr/share/codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/
[debug]Source directories searched: /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "/home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/TE-yz.c:145"
[debug]Haltepunkt 2 at 0x40261f: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/TE-yz.c, line 145.
[debug]>>>>>>cb_gdb:
Haltepunkt 2 at 0x40261f: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/TE-yz.c, line 145.
[debug]> break "/home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c:150"
[debug]Haltepunkt 3 at 0x400efb: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 150.
[debug]>>>>>>cb_gdb:
Haltepunkt 3 at 0x400efb: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 150.
[debug]> break "/home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c:185"
[debug]Haltepunkt 4 at 0x401169: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 185.
[debug]>>>>>>cb_gdb:
Haltepunkt 4 at 0x401169: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 185.
[debug]> break "/home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c:200"
[debug]Haltepunkt 5 at 0x401197: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 200.
[debug]>>>>>>cb_gdb:
Haltepunkt 5 at 0x401197: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 200.
[debug]> break "/home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c:217"
[debug]Haltepunkt 6 at 0x4011d8: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 217.
[debug]>>>>>>cb_gdb:
Haltepunkt 6 at 0x4011d8: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 217.
[debug]> break "/home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c:220"
[debug]Haltepunkt 7 at 0x40121a: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 220.
[debug]>>>>>>cb_gdb:
Haltepunkt 7 at 0x40121a: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 220.
[debug]> tty /dev/?
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]/dev/?: Datei oder Verzeichnis nicht gefunden.
[debug]During startup program exited with code 1.
[debug]Starting program: /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/bin/Debug/FDTD-Toroidal
[debug]>>>>>>cb_gdb:
During startup program exited with code 1.
[debug]> quit
Debugger finished with status 0
--- End code ---
So all in all the debugger is not really starting.
I tried debugging other codes and get the same problem. Guess reinstalling codeblocks would work, but that doesn't prevent me from doing the same mistake again.
I've read some threads concerning the debugger around here, but haven't really found my problem.
Looking forward to an answer.
Curlz
oBFusCATed:
Does it work if you execute the same commands in gdb started from terminal?
Curlz:
First of all thanks for your time!
Running gdb from console works fine. After specifying everything the code starts running until it hits the first breakpoint.
I'm not really used to working with gdb from console though. Guess I will try to find my error this way until I figure out how to get gdb running in codeblocks again.
Cheers.
oBFusCATed:
Can you show me the log from the console?
p.s. keep in mind that because your locale is set to German C::B won't work correctly. It parses the gdb output and expects English messages! You have to reset the locale to English.
Curlz:
Using gbd from console looks like this
--- Code: ---lennart@ipfpc153:~/Dokumente/IGVP-Rechner/FDTD-Toroidal$ gdb
GNU gdb (Ubuntu 7.11-0ubuntu1) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) file ./bin/Debug/FDTD-Toroidal
Reading symbols from ./bin/Debug/FDTD-Toroidal...done.
(gdb) break 217
Haltepunkt 1 at 0x401224: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 217.
(gdb) break 222
Haltepunkt 2 at 0x401233: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 222.
(gdb) break 225
Haltepunkt 3 at 0x401275: file /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c, line 225.
(gdb) run
Starting program: /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/bin/Debug/FDTD-Toroidal
f_in in GHz =
16
Breakpoint 2, main () at /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/main.c:222
222 source(t, y_max, z_max, mesh, pi, dt, jplas, e_field);
--- End code ---
Hope this is the log you were asking for?!
The has code been compiled with codeblocks (using gcc) before. Breakpoint 1 is within an if statement I'm using for debugging now and is therefore skipped here, the other two are at functions that are possibly involved in my problem.
Thanks for the tip with my locale language. Will switch to english right away.
PS: Just tried debugging in C::B again and changing my locale language didn't do the trick. Also resetted to default in setting > debugger > GBD/CDB debugger.
Navigation
[0] Message Index
[#] Next page
Go to full version