Unable to debug C++ app on remote docker container, using gdb [message #1783489] |
Tue, 13 March 2018 14:59 |
kaleem beg Messages: 2 Registered: March 2018 |
Junior Member |
|
|
Scenario
Trying to debug C++ app remotely from Ubuntu 16.04 in Eclipse oxygen, compiled for x86_64 target, on a remote docker container that has a gdb server (also compiled for x86_64 target).
Running in priviliged mode.
The debug fails with an error message:
Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:32793
Error message from debugger back end:
localhost:32793: Connection timed out.
localhost:32793: Connection timed out.
##############################################################################
the debug configuration snapshot is attached.
The scenario works when running the docker container on the same Ubuntu machine instead of on the remote machine.
In the eclipse docker view, I have added a docker connection for the remote machine and can see all the dockers/container on the remote machine, and also able to start/stop containers remotely.
I am accessing the Docker daemon remotely by enabling the tcp Socket.
#####################################################
When I manually call docker run with --net=host (to use host network stack), The gdb works from the command line and gdb(on local machine) and gdb-server(on remote machine) communicate with each other just fine. I think the issue is that Eclipse internally does not call docker run with --net=host and neither allows the user to set this option, from the Debug configuration window.
[Updated on: Wed, 14 March 2018 03:52] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02525 seconds