User forums > Using Code::Blocks
Problem with debugger
Pecan:
Would you turn on the Debuggers debugging log:
MainMenu=>Settings=>Compiler and Debugger=>Debugger Settings=>check Display Debuggers log
Now debug youf program again and paste the contents of the tab marked "Debugger (debug)" and also the contents of the tab marked "Debugger".
Let's see what gdb sees.
kramed:
The xterm -e sleep 60 is working when I type it into another console
kramed:
--- Code: ---Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug
Adding source dir: /home/mark/test/
Adding source dir: /home/mark/test/
Adding file: bin/Debug/test
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
At /home/mark/test/test.cpp:18
At /home/mark/test/test.cpp:19
--- End code ---
I used the program you posted and set the break right before the cin. I stepped until it got to the cin and then I am forced to stop the debugger manually.
Pecan:
This is the Debugger log. I also need the "Debuggers (debug)" log as mentioned above. You may have to use the little black arrow at the right of the tabs to get to it.
kramed:
--- Code: ---Command-line: /usr/bin/gdb -nx -fullname -quiet -args bin/Debug/test
Working dir : /home/mark/test/
> set prompt >>>>>>cb_gdb:
Executing: xterm -T 'Program Console' -e sleep
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-slackware-linux".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> directory /home/mark/test/
>>>>>>cb_gdb:
> delete breakpoints
>>>>>>cb_gdb:
> break "/home/mark/test/test.cpp:17"
Breakpoint 1 at 0x8048a5b: file /home/mark/test/test.cpp, line 17.
>>>>>>cb_gdb:
Executing: ps x -o tty,pid,command
PS result: ? 27347 gaim
PS result: ? 27119 kio_file [kdeinit] file /tmp/ksocket-mark/klauncherMOSOQb.slave-socket /tmp/ksocket-mark/kdevelopKzOKsa.slave-socket
PS result: ? 25985 konqueror [kdeinit] --silent
PS result: ? 20333 /usr/local/apps/firefox/firefox-bin
PS result: ? 20328 /bin/sh /usr/local/apps/firefox/run-mozilla.sh /usr/local/apps/firefox/firefox-bin
PS result: ? 20325 /bin/sh /usr/local/apps/firefox/firefox
PS result: ? 15990 xchat
PS result: ? 12097 kio_uiserver [kdeinit]
PS result: ? 3253 ps x -o tty,pid,command
PS result: ? 3240 /usr/bin/gdb -nx -fullname -quiet -args bin/Debug/test
PS result: ? 2537 codeblocks
PS result: ? 1694 konqueror [kdeinit] -session 108f363330000117332767600000070480034_1173327676_271749
PS result: ? 1645 superkaramba -session 108f363330000117290000300000036900011_1173329213_704079
PS result: ? 1644 superkaramba -session 108f363330000117290000100000036900010_1173329213_704426
PS result: ? 1642 superkaramba -session 108f363330000117285908400000027280029_1173329213_704201
PS result: ? 1638 kaccess [kdeinit]
PS result: ? 1630 kicker [kdeinit]
PS result: ? 1627 kdesktop [kdeinit]
PS result: ? 1623 kwin [kdeinit] -session 108f363330000117208531500000062480000_1173329221_738408
PS result: ? 1621 ksmserver [kdeinit]
PS result: tty1 1619 kwrapper ksmserver
PS result: ? 1606 kded [kdeinit] --new-startup
PS result: ? 1604 klauncher [kdeinit] --new-startup
PS result: ? 1600 dcopserver [kdeinit] --nosid
PS result: ? 1597 kdeinit Running...
PS result: tty1 1569 /bin/sh /opt/kde/bin/startkde
PS result: tty1 1567 /bin/sh /usr/X11R6/lib/X11/xinit/xinitrc
PS result: tty1 1556 /usr/X11R6/bin/xinit /usr/X11R6/lib/X11/xinit/xinitrc -- -auth /home/mark/.serverauth.1540
PS result: tty1 1540 /bin/sh /usr/X11R6/bin/startx
PS result: tty1 1514 -bash
PS result: pts/1 559 -bash
PS result: ? 558 konsole [kdeinit] --ls
PS result: TT PID COMMAND
Console Execution error:failed to find console tty.
> start
Breakpoint 2 at 0x8048a44: file /home/mark/test/test.cpp, line 13.
main () at /home/mark/test/test.cpp:13
/home/mark/test/test.cpp:13:142:beg:0x8048a44
>>>>>>cb_gdb:
> info program
Using the running image of child process 3254.
Program stopped at 0x8048a44.
It stopped at a breakpoint that has since been deleted.
Type "info stack" or "info registers" for more information.
>>>>>>cb_gdb:
> cont
Breakpoint 1, main () at /home/mark/test/test.cpp:18
/home/mark/test/test.cpp:18:243:beg:0x8048a5b
>>>>>>cb_gdb:
> info locals
value = '\0' <repeats 80 times>
upper_count = -1208292500
>>>>>>cb_gdb:
> info args
No arguments.
>>>>>>cb_gdb:
> next
/home/mark/test/test.cpp:19:309:beg:0x8048a70
>>>>>>cb_gdb:
> info locals
value = '\0' <repeats 80 times>
upper_count = -1208292500
>>>>>>cb_gdb:
> info args
No arguments.
>>>>>>cb_gdb:
> next
Please type in a String (max. 80 characters):
Program received signal SIGINT, Interrupt.
0xb7e1846e in __read_nocancel () from /lib/tls/libc.so.6
>>>>>>cb_gdb:
> info locals
No symbol table info available.
>>>>>>cb_gdb:
> info args
No symbol table info available.
>>>>>>cb_gdb:
> quit
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version