Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] launching a gdb from inside a docker container using DSF/GDB

Hi,

Here's what I'm trying to do that is not succeeding:
I am trying to launch a gdb binary that resides in a docker container by setting my gdb binary to :
docker-exec -i linux_gdb /usr/bin/gdb

This fails with:
cannot enable tty mode on non tty input

on both the gdb -version check and the actual --mi call.

The code that launches gdb does not seem to have a tty/pty  attached to it.  There is code in the spawner class that seems to have this option but that is not being used by the gdb launcher.

Is there some way to accomplish this?
-----
why I care is below in case people are wondering:
We have linux based docker containers that have cross toolchains for various targets installed in them. They also contain gdb for that architecture.  Our longer term goal is to have metadata in the toolchain containers so that they can "tell" the plugin what their capabilities are and so a limited cross toolchain configuration UI can be constructed on the fly based on the toolchain container the user has chosen.

We would like to be able to use the cross toolchains in the container. We are accomplishing this currently using a native stub dispatcher and an Eclipse builder.  This works currently.

We would also like to be able to use the gdb inside the docker container as the gdb executable which Eclipse connects to.  The workspace is bind mounted into the container so the gdb inside the container can see the sources and binaries.  This works fine when we are executing from a shell environment (CLI mode). However, when we are executing it via eclipse (if we do something like gdb = docker exec -I <debug_container> gdb-x86-64) we get failures due to the lack of a tty available to the gdb inside the container.


Thanks for any help/pointers!
-brian


Back to the top