Is it actually possible to configure the eclipse IDE to use the gdb debugger inside a docker container to do remote debugging?
So
Eclipse IDE is on my host
The cross toolchain and debugger are inside my container
The debug binary runs on a remote device.
I am configuring "C/C++ Remote Application" in Eclipse and my gdb path is set to
docker run -it --rm --privileged -p 5000:5000 docker-gdb
After hitting the debug button in Eclipse the gdbserver is starting and listening on port 5000 on the target system. The entrypoint of my image is gdb itself. Inside a shell, the remote debugging is working fine.
But Eclipse gives the error "the input device is not a TTY" or "Timed out trying to launch GDB" when the docker command runs with "-i" instead of "-it".
Related
With following setup:
ubuntu VM, running eclipse C/C++ IDE
ubuntu 16.04 docker container with PTXdist build system and gcc toolchain
source code in VM filesystem mounted to docker container
remote target connected via SSH
What works and what not:
PTXdist: build project from command line - OK, works
make: build project from command line - OK, works
gdb: from command line - attach to binary in running container works
eclipse:
debug configuration calls python script which executes docker gdb in running container
FAILED with timeout on gdb version
It looks like the gdb machine interface is not reachable from eclipse while checking the gdb version (as a connection test?).
Already tried to attach STDIN,STDOUT to the container, but without success.
Does anyone have a hint to configure this setup?
P.S. The next step will be to switch from ubuntu VM to Windows 10 (with Docker Desktop + WSL2)
I am using Eclipse docker tooling (version 5.1.0.202012081929). Is there any way to specify docker options, for instance -w /usr/src/mymaven or -p 8080:8080? The first example is an option missing from the dialog, while the second would help debug or override what may not be working from the dialog.
How to uninstall eclipse che completely on mac osx?
Used mac osx installer to install binary. Seems che is always running on 8080 even killed the process and stopped docker.
https://eclipse.org/che/
I couldn't find the better way for uninstall on Mac but you can stop the Tomcat embedded in Eclipse Che.
The path is /Applications/EclipseChe3.12.5.2.app/Contents/Resources/eclipse-che/tomcat/bin
Next step is stop the Tomcat instance and finally delete the folder EclipseChe3.12.5.2.app because that's my Eclipse Che version.
So, I hope this is helpfully for you
If you are using Docker the process is different.
Get the list of active instance in Docker by running the following command in Terminal: docker ps
Then you can stop the running instance by running in docker stop XXX where XXX is the name of the running container instance. You may have more than one container instance to stop.
Then you can remove it by running docker rm XXX and then you can list images that are present on your system by running docker images
If you want to completely remove Che, then pickup for the images list the ones that are related to che and remove them by running the following command: docker mi image_name
Last command to stop docker on your mac will be docker-machin stop environment_name. If you do not know the name of the running environment you can figure it out by running docker-machine ls
I have a program that I'd like to run remotely under Valgrind using the Linux Tools remote Valgrind profiler.
I normally debug remotely on a headless server (which has special hardware, so it has to be done remotely on that machine) using RSE, which works fine. Both my machine and the target are Linux machines.
I am now trying to get Valgrind working through Eclipse using the Linux Tools plugin. I have Valgrind 3.10 installed on the remote target machine, and I can run it up manually (outside of Eclipse):
Remotely:
valgrind --vgdb=full --vgdb-error=0 /path/to/app --args
vgdb --port=2345 --pid=XXXX
Locally, connect with gdb with target remote host:2345.
However, I can't work out how to get the "Valgrind (remote)" Eclipse tooling to emulate this, aping the "RemoteTools" setup shown here: .
When I write in a "To:" executable that starts with "rse:/", I get an error in the Profiling Tools settings window top corner saying [Valgrind Options]: Couldn't determine version of Valgrind. What should I write here to get a working remote Valgrind connection?
Haven't found more recent posts on the topic, maybe it will be useful for somebody. I also didn't manage to use remote valgrind plugin with RSE. Seems like only dstore connection type will work for Linux Tools remote valgrind, because SSH or FTP didn't work for me. rseserver requires Perl and Java, and I didn't have them on my target.
I had to use this complicated solution via Launch Group combining this and this solutions. Preconditions: valgrind and vgdb are installed on remote target.
Write a script start_remote_valgrind.sh
set -x
remote_ip=192.168.7.2
remote_port=2222
app_name=test_app
remote_dir=/usr/local/bin/
local_dir=/home/project_name/
ssh -T root#$remote_ip killall -9 vgdb
ssh -T root#$remote_ip killall -9 valgrind
scp $local_dir$app_name root#$remote_ip:$remote_dir$app_name
ssh root#$remote_ip valgrind --vgdb=full --vgdb-error=0 --leak-check=full -v $remote_dir$app_name &
sleep 1
ssh root#$remote_ip vgdb --port=$remote_port
Create debug configuration Run->Debug Configurations->C/C++ remote application:
2.1 On themain tab set the project name and app binary
2.2 In the bottom of the configuration window click "Select Other" link and select "GDB (DSF) manual remote launcher"
2.3 On Debugger tab set GDB debugger for you target platform, command line script .gdbinit.
2.4 On Debugger->connection tab set TCP connection, remote ip and port.
Create external tool Run->external tools->external tools configuration...
Create Launch Group Run->Debug Configurations->Launch Group
external tool must be in Run configuration, remote gdb in Debug. The benefit of this approach is that remote valgrind output is printed in Eclipse console, so you don't need to launch vgdb manually in a separate console and see messages in separate window.
I have a tomcat7 server created inside the eclipse and I want to start and stop the server using terminal in ubuntu. Is there a way to do that ?
You can start or stop the tomcat in ubuntu terminal using "sh startup.sh" to start up and "sh shutdown.sh" to shut down. These shell scripts can be found in the "$(tomcat_folder)/bin".
Hope it helps.
First, find the tomcat path that eclipse is using. Then navigate the that path in ubuntu terminal and simply
sh startup.sh // starts up the server
and
sh shutdown.sh // shuts down the server