gdb does not display symbols, when running alpine in a container on OpenShift 3.11
OpenShift is the Redhat kubernete distribution, so maybe there's a glibc thing going on.
Here is how I make my container:
- with alpine -> https://github.com/machinezone/IXWebSocket/blob/master/docker/Dockerfile.alpine (no symbols when attaching)
- with centos8 -> https://github.com/machinezone/IXWebSocket/blob/master/docker/Dockerfile.centos (I get symbols when attaching to the running process)
I'm building in debug. I know there's a -ggdb option which maybe I could pass explicitly, but in 2020 it is probably the default under the hood.
I don't know if the normal distributed binaries have some symbols left (probably not), but the program I compile is 'ws' which is available as a port since alpine 3.11. ws connect wss://echo.websocket.org
will let the program run. There's a --pidfile option too.
I've tried to repro in docker, but I cannot attach a debugger when I run in docker, the PTRACE permission is not granted and I cannot figure out how to change that. I used to be able to do that but now I can't.
I should test on Openshift 4.2 to see if this makes any difference.
Thanks for any ideas or clues ?