Home » Language IDEs » C / C++ IDE (CDT) » breakpoints ignored(docker/trusty/java 8/eclipse/cdt/ssh/x11 works, builds, runs, but does not debug)
breakpoints ignored [message #1709731] |
Wed, 30 September 2015 14:54 |
nir droid Messages: 6 Registered: September 2015 |
Junior Member |
|
|
hi,
my configuration is:
running as docker image
* ubuntu trusty (14.04) + java 8 + eclipse cdt
* build essentials (...)
* ssh + x11
i login from another machine (windows + putty + xming) and run eclipse
everything works fine - it builds and run everything
the problem is when I try to debug it:
1. eclipse does not suggest me to open the debug view. this is not a big issue but it may suggest a problem
2. it does not break on the breakpoints
i tried it with the "hello world" wizard app, and here are the relevant logs:
gdb traces:
444,132 2-gdb-version
444,132 ~"GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1\n"
444,135 ~"Copyright (C) 2014 Free Software Foundation, Inc.\n"
444,135 ~"License GPLv3+: GNU GPL version 3 or later <http ://gnu.org/licenses/gpl.html>\nThis is fre\
e software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitt\
ed by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
444,135 ~"This GDB was configured as \"x86_64-linux-gnu\".\nType \"show configuration\" for configur\
ation details."
444,135 ~"\nFor bug reporting instructions, please see:\n"
444,135 ~"<http ://www.gnu.org/software/gdb/bugs/>.\n"
444,135 ~"Find the GDB manual and other documentation resources online at:\n<http ://www.gnu.org/soft\
ware/gdb/documentation/>.\n"
444,135 ~"For help, type \"help\".\n"
444,135 ~"Type \"apropos word\" to search for commands related to \"word\".\n"
444,135 2^done
444,136 (gdb)
444,143 3-environment-cd /home/eclipse/workspace_tmp2/hw
444,144 3^done
444,144 (gdb)
444,145 4-gdb-set breakpoint pending on
444,145 4^done
444,145 (gdb)
444,155 5-gdb-set detach-on-fork on
444,155 5^done
444,155 (gdb)
444,156 6-enable-pretty-printing
444,156 6^done
444,156 (gdb)
444,158 7-gdb-set python print-stack none
444,158 7^done
444,158 (gdb)
444,160 8-gdb-set print object on
444,160 8^done
444,160 (gdb)
444,161 9-gdb-set print sevenbit-strings on
444,161 9^done
444,161 (gdb)
444,163 10-gdb-set host-charset UTF-8
444,163 10^done
444,163 (gdb)
444,169 11-gdb-set target-charset US-ASCII
444,169 11^done
444,170 (gdb)
444,171 12-gdb-set target-wide-charset UTF-32
444,171 12^done
444,172 (gdb)
444,173 13-gdb-set dprintf-style call
444,173 13^done
444,173 (gdb)
444,176 14source .gdbinit
444,176 &"source .gdbinit\n"
444,177 &".gdbinit: No such file or directory.\n"
444,177 14^error,msg=".gdbinit: No such file or directory."
444,177 (gdb)
444,180 15-gdb-set target-async off
444,180 15^done
444,180 (gdb)
444,181 16-gdb-set auto-solib-add on
444,182 16^done
444,182 (gdb)
444,202 17-file-exec-and-symbols --thread-group i1 /home/eclipse/workspace_tmp2/hw/Debug/hw
444,209 17^done
444,209 (gdb)
444,213 18-gdb-show --thread-group i1 language
444,213 18^done,value="auto"
444,214 (gdb)
444,215 19-gdb-set --thread-group i1 language c
444,215 19^done
444,215 (gdb)
444,217 20-interpreter-exec --thread-group i1 console "p/x (char)-1"
444,217 ~"$1 = 0xff\n"
444,217 20^done
444,218 (gdb)
444,223 21-data-evaluate-expression --thread-group i1 "sizeof (void*)"
444,223 21^done,value="8"
444,223 (gdb)
444,227 22-gdb-set --thread-group i1 language auto
444,228 22^done
444,228 (gdb)
444,230 23-interpreter-exec --thread-group i1 console "show endian"
444,230 ~"The target endianness is set automatically (currently little endian)\n"
444,230 23^done
444,230 (gdb)
444,266 24-list-thread-groups
444,266 24^done,groups=[{id="i1",type="process",executable="/home/eclipse/workspace_tmp2/hw/Debug/hw\
"}]
444,269 (gdb)
444,274 25-break-insert -f /home/eclipse/workspace_tmp2/hw/src/hw.cpp:13
444,275 25^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400861"\
,func="main()",file="../src/hw.cpp",fullname="/home/eclipse/workspace_tmp2/hw/src/hw.cpp",line="13",\
thread-groups=["i1"],times="0",original-location="/home/eclipse/workspace_tmp2/hw/src/hw.cpp:13"}
444,276 (gdb)
444,314 26-break-insert -t -f main
444,314 26^done,bkpt={number="2",type="breakpoint",disp="del",enabled="y",addr="0x0000000000400861",\
func="main()",file="../src/hw.cpp",fullname="/home/eclipse/workspace_tmp2/hw/src/hw.cpp",line="13",t\
hread-groups=["i1"],times="0",original-location="main"}
444,314 (gdb)
444,323 27-inferior-tty-set --thread-group i1 /dev/pts/1
444,323 27^done
444,323 (gdb)
444,337 28-exec-run --thread-group i1
444,337 =thread-group-started,id="i1",pid="293"
444,338 =thread-created,id="1",group-id="i1"
444,338 29-list-thread-groups --available
444,348 =thread-exited,id="1",group-id="i1"
444,348 =thread-group-exited,id="i1"
444,348 28^error,msg="During startup program exited normally."
444,349 (gdb)
444,351 29^done,groups=[{id="1",type="process",description="/usr/sbin/sshd -D",user="root",cores=["2\
"]},{id="5",type="process",description="sshd: eclipse [priv]",user="root",cores=["1"]},{id="16",type\
="process",description="sshd: eclipse@pts/0",user="eclipse",cores=["2"]},{id="17",type="process",des\
cription="-bash",user="eclipse",cores=["1"]},{id="29",type="process",description="eclipse",user="ecl\
ipse",cores=["3"]},{id="212",type="process",description="/usr/bin/java -Dosgi.requiredJavaVersion=1.\
7 -XX:MaxPermSize=256m -Xms256m -Xmx1024m -jar /usr/local/eclipse//plugins/org.eclipse.equinox.launc\
her_1.3.100.v20150511-1540.jar -data file:/home/eclipse/workspace_tmp2/ -os linux -ws gtk -arch x86_\
64 -showsplash /usr/local/eclipse//plugins/org.eclipse.platform_4.5.0.v20150603-2000/splash.bmp -lau\
ncher /usr/local/eclipse/eclipse -name Eclipse --launcher.library /usr/local/eclipse//plugins/org.ec\
lipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417/eclipse_1612.so -startup /usr/local/e\
clipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar --launcher.appendVmargs -exi\
tdata 0 -product org.eclipse.epp.package.cpp.product -vm /usr/bin/java -vmargs -Dosgi.requiredJavaVe\
rsion=1.7 -XX:MaxPermSize=256m -Xms256m -Xmx1024m -jar /usr/local/eclipse//plugins/org.eclipse.equin\
ox.launcher_1.3.100.v20150511-1540.jar",user="eclipse",cores=["0","1","2","3"]},{id="278",type="proc\
ess",description="gdb --interpreter mi2 --nx",user="eclipse",cores=["0"]}]
444,352 (gdb)
444,375 30-gdb-exit
444,378 30^exit
eclipse log:
!SESSION 2015-09-30 14:04:51.869 -----------------------------------------------
eclipse.buildId=4.5.0.I20150603-2000
java.version=1.8.0_60
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.cpp.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.cpp.product
!ENTRY org.eclipse.cdt.dsf 4 10005 2015-09-30 14:09:23.261
!MESSAGE Request for monitor: 'RequestMonitor (org.eclipse.cdt.dsf.mi.service.MIRunControl$9@42f3efb4): Status ERROR: org.eclipse.cdt.dsf.gdb code=10001 Context cannot be suspended. null' resulted in an error.
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10001 2015-09-30 14:09:23.261
!MESSAGE Context cannot be suspended.
|
|
| | |
Re: breakpoints ignored [message #1709898 is a reply to message #1709883] |
Thu, 01 October 2015 19:31 |
nir droid Messages: 6 Registered: September 2015 |
Junior Member |
|
|
the short version:
eclipse@eclipse:~/workspace/hw/Debug$ gdb -i mi -nx ./hw
=thread-group-added,id="i1"
~"GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1\n"
~"Copyright (C) 2014 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http ://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-linux-gnu\".\nType \"show configuration\" for configuration details."
~"\nFor bug reporting instructions, please see:\n"
~"<http ://www.gnu.org/software/gdb/bugs/>.\n"
~"Find the GDB manual and other documentation resources online at:\n<http ://www.gnu.org/software/gdb/documentation/>.\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\"...\n"
~"Reading symbols from ./hw..."
~"done.\n"
(gdb)
start
&"start\n"
~"Temporary breakpoint 1 at 0x400861: file ../src/hw.cpp, line 13.\n"
=breakpoint-created,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x0000000000400861",func="main()",file="../src/hw.cpp",fullname="/home/eclipse/workspace/hw/src/hw.cpp",line="13",thread-groups=["i1"],times="0",original-location="main"}
~"Starting program: /home/eclipse/workspace/hw/Debug/hw \n"
=thread-group-started,id="i1",pid="19533"
=thread-created,id="1",group-id="i1"
hello hw
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1"
&"During startup program exited normally.\n"
^error,msg="During startup program exited normally."
(gdb)
the full (eclipse) version:
eclipse@eclipse:~/workspace/hw/Debug$ gdb -i mi -nx ./hw
=thread-group-added,id="i1"
~"GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1\n"
~"Copyright (C) 2014 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http ://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThee \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-linux-gnu\".\nType \"show configuration\" for configuration details."
~"\nFor bug reporting instructions, please see:\n"
~"<http ://www.gnu.org/software/gdb/bugs/>.\n"
~"Find the GDB manual and other documentation resources online at:\n<http ://www.gnu.org/software/gdb/documentation/>.\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\"...\n"
~"Reading symbols from ./hw..."
~"done.\n"
(gdb)
2-gdb-version
~"GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1\n"
~"Copyright (C) 2014 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http ://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-linux-gnu\".\nType \"show configuration\" for configuration details."
~"\nFor bug reporting instructions, please see:\n"
~"<http ://www.gnu.org/software/gdb/bugs/>.\n"
~"Find the GDB manual and other documentation resources online at:\n<http ://www.gnu.org/software/gdb/documentation/>.\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\".\n"
2^done
(gdb)
3-environment-cd /home/eclipse/workspace/hw
3^done
(gdb)
4-gdb-set breakpoint pending on
4^done
(gdb)
5-gdb-set detach-on-fork on
5^done
(gdb)
6-enable-pretty-printing
6^done
(gdb)
7-gdb-set python print-stack none
7^done
(gdb)
8-gdb-set print object on
8^done
(gdb)
9-gdb-set print sevenbit-strings on
9^done
(gdb)
10-gdb-set host-charset UTF-8
10^done
(gdb)
11-gdb-set target-charset US-ASCII
11^done
(gdb)
12-gdb-set target-wide-charset UTF-32
12^done
(gdb)
13-gdb-set dprintf-style call
13^done
(gdb)
14source .gdbinit
&"source .gdbinit\n"
&".gdbinit: No such file or directory.\n"
14^error,msg=".gdbinit: No such file or directory."
(gdb)
15-gdb-set target-async off
15^done
(gdb)
16-gdb-set auto-solib-add on
16^done
(gdb)
17-file-exec-and-symbols --thread-group i1 /home/eclipse/workspace/hw/Debug/hw
17^done
(gdb)
18-gdb-show --thread-group i1 language
18^done,value="auto"
(gdb)
19-gdb-set --thread-group i1 language c
19^done
(gdb)
20-interpreter-exec --thread-group i1 console "p/x (char)-1"
~"$1 = 0xff\n"
20^done
(gdb)
21-data-evaluate-expression --thread-group i1 "sizeof (void*)"
21^done,value="8"
(gdb)
22-gdb-set --thread-group i1 language auto
22^done
(gdb)
23-interpreter-exec --thread-group i1 console "show endian"
~"The target endianness is set automatically (currently little endian)\n"
23^done
(gdb)
24-list-thread-groups
24^done,groups=[{id="i1",type="process",executable="/home/eclipse/workspace/hw/Debug/hw"}]
(gdb)
25-break-insert -f /home/eclipse/workspace/hw/src/hw.cpp:14
25^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x000000000040087d",func="main()",file="../src/hw.cpp",fullname="/home/eclipse/workspace/hw/src/hw.cpp",line="14",thread-groups=["i1"],times="0",original-location="/home/eclipse/workspace/hw/src/hw.cpp:14"}
(gdb)
26-break-insert -f /home/eclipse/workspace/hw/src/hw.cpp:13
26^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400861",func="main()",file="../src/hw.cpp",fullname="/home/eclipse/workspace/hw/src/hw.cpp",line="13",thread-groups=["i1"],times="0",original-location="/home/eclipse/workspace/hw/src/hw.cpp:13"}
(gdb)
27-break-insert -t -f main
27^done,bkpt={number="3",type="breakpoint",disp="del",enabled="y",addr="0x0000000000400861",func="main()",file="../src/hw.cpp",fullname="/home/eclipse/workspace/hw/src/hw.cpp",line="13",thread-groups=["i1"],times="0",original-location="main"}
(gdb)
28-inferior-tty-set --thread-group i1 /dev/pts/1
28^done
(gdb)
29-exec-run --thread-group i1
&"/dev/pts/1: No such file or directory.\n"
=thread-group-started,id="i1",pid="19520"
=thread-created,id="1",group-id="i1"
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1"
29^error,msg="During startup program exited with code 1."
(gdb)
30-list-thread-groups --available
30^done,groups=[{id="1",type="process",description="/usr/sbin/sshd -D",user="root",cores=["3"]},{id="5",type="process",description="sshd: eclipse [priv]",user="root",cores=["0"]},{id="16",type="process",description="sshd: eclipse@pts/0",user="eclipse",cores=["2"]},{id="17",type="process",description="-bash",user="eclipse",cores=["1"]},{id="229",type="process",description="cpp/bin/samples/AboutService",user="eclipse",cores=["0","1","2","3"]},{id="724",type="process",description="/home/eclipse/alljoyn_repo/15.04/core/alljoyn/build/linux/x86_64/debug/dist/cpp/bin/alljoyn-daemon",user="eclipse",cores=["0","1","2","3"]},{id="19415",type="process",description="eclipse",user="eclipse",cores=["3"]},{id="19416",type="process",description="/usr/bin/java -Dosgi.requiredJavaVersion=1.7 -XX:MaxPermSize=256m -Xms256m -Xmx1024m -jar /usr/local/eclipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar -os linux -ws gtk -arch x86_64 -showsplash /usr/local/eclipse//plugins/org.eclipse.platform_4.5.0.v20150603-2000/splash.bmp -launcher /usr/local/eclipse/eclipse -name Eclipse --launcher.library /usr/local/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417/eclipse_1612.so -startup /usr/local/eclipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar --launcher.appendVmargs -exitdata 10001 -product org.eclipse.epp.package.cpp.product -vm /usr/bin/java -vmargs -Dosgi.requiredJavaVersion=1.7 -XX:MaxPermSize=256m -Xms256m -Xmx1024m -jar /usr/local/eclipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar",user="eclipse",cores=["0","1","2","3"]},{id="19518",type="process",description="gdb -i mi -nx ./hw",user="eclipse",cores=["0"]}]
(gdb)
31-list-thread-groups
31^done,groups=[{id="i1",type="process",executable="/home/eclipse/workspace/hw/Debug/hw"}]
(gdb)
32-gdb-exit
32^exit
there is an error in command 29 with the /dev/pts/1, im not sure how important is it
|
|
| |
Re: breakpoints ignored [message #1709910 is a reply to message #1709909] |
Thu, 01 October 2015 20:34 |
nir droid Messages: 6 Registered: September 2015 |
Junior Member |
|
|
two more outputs:
1. when i remove #28:
27-break-insert -t -f main
27^done,bkpt={number="3",type="breakpoint",disp="del",enabled="y",addr="0x0000000000400861",func="main()",file="../src/hw.cpp",fullname="/home/eclipse/workspace/hw/src/hw.cpp",line="13",thread-groups=["i1"],times="0",original-location="main"}
(gdb)
29-exec-run --thread-group i1
=thread-group-started,id="i1",pid="19701"
=thread-created,id="1",group-id="i1"
hello hw
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1"
29^error,msg="During startup program exited normally."
(gdb)
2. when i change /dev/pts/1 to /dev/pts/0:
27-break-insert -t -f main
27^done,bkpt={number="3",type="breakpoint",disp="del",enabled="y",addr="0x0000000000400861",func="main()",file="../src/hw.cpp",fullname="/home/eclipse/workspace/hw/src/hw.cpp",line="13",thread-groups=["i1"],times="0",original-location="main"}
(gdb)
28-inferior-tty-set --thread-group i1 /dev/pts/0
28^done
(gdb)
29-exec-run --thread-group i1
&"warning: GDB: Failed to set controlling terminal: Operation not permitted\n"
=thread-group-started,id="i1",pid="19707"
=thread-created,id="1",group-id="i1"
hello hw
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1"
29^error,msg="During startup program exited normally."
(gdb)
|
|
| | | |
Goto Forum:
Current Time: Sun Sep 15 10:25:05 GMT 2024
Powered by FUDForum. Page generated in 0.04796 seconds
|