I have an M2 Macbook that is running Docker Desktop and I’d like to be able to debug linux/amd64 binaries in linux/amd64 containers.
Debugging under qemu directly or UTM works fine. So I know it is not a Qemu limitation. I even tried hard-swapping the Qemu binary on my system with the Qemu binary packaged with Docker. I also recently tried enabling the new Rosetta emulation support.
However, when I attempt to run something like
docker run --cap-add=SYS_PTRACE --privileged --platform linux/amd64 -ti amd64/ubuntu:latest /bin/bash # apt-get update && apt-get install -y gdb # gdb /bin/bash
I get the following error message
Cannot PTRACE_GETREGS: Input/output error
Anyone been anble to succesfully debug linux/amd64 binaries in a linux/amd64 container while running on M1/M2/M3.