Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

17
  • By can't inspect the processes of the other (as long as that's not a fork of the same namespace) do you mean that the latter PID namespace is created by calling clone(2) from a process in the parent PID namespace? Commented Nov 13, 2024 at 17:44
  • 1
    that's why I said "equivalent to a directory": When you can move a docker image somewhere, you can also do the much less privilege operation of moving a directory somewhere. Anyways, the option for sharing PID namespace with a target container is --pid container:{other container}. It' Commented Nov 13, 2024 at 18:40
  • 1
    Ah, fair point, I don't know the interaction between LXC and docker there, most likely it doesn't. Yeah, in case sharing the host PID NS with your container doesn't work, and sharing with an LXC container is not implemented, your docker container is simply not fit for its purpose. Simply compile GDB for your host system, and use the PREFIX when configuring it to install it into a subdirectory of your home directory. No special privileges needed, at all. Commented Nov 13, 2024 at 18:51
  • 1
    Software doesn't need to get "installed". It needs to find the libraries it needs, and you need to know how to invoke it. In the case of GDB and binutils, installations into local prefixes are very common and not a problem you need a docker container for. You can just install in a directory, copy that directory to another machine, and use it there – assuming you tell your system that libraries and binaries are in there, through the use of the PATH and LD_LIBRARY_PATH variables. Commented Nov 13, 2024 at 18:53
  • 1
    Do you mean a build on a system with the same set of libraries installed as the host where gdb is supposed to run on ? In this case using a container (on the system where gdb is actually built) is the best option, as you said. Commented Nov 21, 2024 at 6:49