Bug #18927 2013-03-11 04:54
titan99
if codeblocks use gdb link gdbserver debug will occur bug
I have write a easy test.c program below : 1: #include <stdio.h> 2: #include <stdlib.h> 3: int main() 4: { 5: printf("Hello world!\n"); 6: printf("1!\n"); 7: printf("2!\n"); 8: printf("3!\n"); 9: printf("4!\n"); 10: printf("5!\n"); 11: return 0; 12:} and set break point on line 7,8,9 , I use gdbserver test it , my command is : sudo gdbserver :1000 test < use network TCP port 1000 debug test program > and codeblocks use gdb setup TCP port 1000 link to gdbserver , codeblocks will break on line 7 , this time you open codeblocks's Debugs->debug windows->breakpoints you will see info has index:-1 please test this bug thanks . below is full debug information : Selecting target: Debug Adding source dir: /home/titan/test/ Adding source dir: /home/titan/test/ Adding file: /home/titan/test/bin/Debug/test Changing directory to: /home/titan/test/. Set variable: LD_LIBRARY_PATH=.: [debug]Command-line: /usr/local/bin/gdb -nx -fullname -quiet -args /home/titan/test/bin/Debug/test [debug]Working dir : /home/titan/test Starting debugger: /usr/local/bin/gdb -nx -fullname -quiet -args /home/titan/test/bin/Debug/test done [debug]Reading symbols from /home/titan/test/bin/Debug/test...done. [debug](gdb) [debug]> set prompt >>>>>>cb_gdb: Registered new type: wxString Registered new type: STL String Registered new type: STL Vector Connecting to remote target Setting breakpoints [debug]>>>>>>cb_gdb: [debug]> show version [debug]GNU gdb (GDB) 7.5.1 [debug]Copyright (C) 2012 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-pc-linux-gnu". [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.5.1 [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]> source /usr/local/share/codeblocks/scripts/stl-views-1.0.3.gdb [debug]>>>>>>cb_gdb: [debug]> directory /home/titan/test/ [debug]Source directories searched: /home/titan/test:$cdir:$cwd [debug]>>>>>>cb_gdb: [debug]> target remote tcp:192.168.1.99:1000 [debug]Remote debugging using tcp:192.168.1.99:1000 [debug]Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. [debug]Loaded symbols for /lib/ld-linux.so.2 [debug]0x00cf1850 in ?? () from /lib/ld-linux.so.2 [debug]>>>>>>cb_gdb: Connected [debug]> break "/home/titan/test/main.c:7" Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. In ?? () (/lib/ld-linux.so.2) [debug]> break "/home/titan/test/main.c:7" [debug]Breakpoint 1 at 0x8048455: file /home/titan/test/main.c, line 7. [debug]>>>>>>cb_gdb:Note: breakpoint 1 also set at pc 0x8048455. [debug]> break "/home/titan/test/main.c:8" [debug]Breakpoint 2 at 0x8048455: file /home/titan/test/main.c, line 7. [debug]>>>>>>cb_gdb:Breakpoint 3 at 0x8048461: file /home/titan/test/main.c, line 8. [debug]> break "/home/titan/test/main.c:9" [debug]>>>>>>cb_gdb: [debug]> bt 30 [debug]Breakpoint 4 at 0x804846d: file /home/titan/test/main.c, line 9. [debug]>>>>>>cb_gdb:#0 0x00cf1850 in ?? () from /lib/ld-linux.so.2 [debug]>>>>>>cb_gdb: [debug]> tty /dev/pts/1 [debug]Queued:[tty /dev/pts/1] [debug]>>>>>>cb_gdb: [debug]> continue [debug]Continuing. [debug]Breakpoint 1, main () at /home/titan/test/main.c:7 [debug]/home/titan/test/main.c:7:102:beg:0x8048455 [debug]>>>>>>cb_gdb: At /home/titan/test/main.c:7
- Category
- Debugger
- Group
- Platform:Linux
- Status
- Open
- Close date
- Assigned to
- tpetrov