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
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
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
Using gbd from console looks like this
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);
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.
At the end of the first log it says (now in english)
[debug]> tty /dev/?
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]/dev/?: No such file or directory.
[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
Not sure, but it seems like gdb is trying to run the wrong file here?
Alright. The gdb tty/ dev/? before the run is causing the problem..
This is now from console
(gdb) tty /dev/?
(gdb) run
Starting program: /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/bin/Debug/FDTD-Toroidal
/dev/?: No such file or directory.
During startup program exited with code 1.
It's looking for the right program which is in /home/lennart/Dokumente/IGVP-Rechner/FDTD-Toroidal/bin/Debug/FDTD-Toroidal, but can't find the terminal dev/?.
Yes this topic is more than 120 days old but it is the only hit I got, searching for "cb_gdb: During startup program exited with code 1".
Do we want to scatter information about a single problem in more than one topic?
I think not, so:
I had the same error today, using gnome-terminal as a console and also in my case I could revert to xterm to solve the error.
My xterm line that works:
xterm -sl 10000000 -geometry 100x109 -T $TITLE -e
The console line that used to work but failed today:
gnome-terminal --geometry=75x100 --title=$TITLE -x
I would really like to use another terminal than xterm because copying text from xterm really doesn't work for me.
Can we give this old problem another look? It seems that gnome terminal and konsole cannot find the proper tty device in the /dev/ directory
The part of the log where it fails with gnome-terminal:
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/?
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]/dev/?: No such file or directory.
[debug]During startup program exited with code 1.
[debug]Starting program: /home/(deleted)
[debug]>>>>>>cb_gdb:
During startup program exited with code 1.
[debug]> quit
and when it succeeds with xterm:
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/pts/1
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: /home/(deleted)
[debug][Inferior 1 (process 4904) exited normally]
[debug]>>>>>>cb_gdb:
[Inferior 1 (process 4904) exited normally]
[debug]> quit