Debugging AArch64 binaries using qemu-arm inside a x86 Docker container? #557
Replies: 1 comment
-
I don't know, probably there is. Debugging is already a complex process, and the more complexity you add, the higher the risk to have problems.
Yeah, and instead you prefer to pollute the Host PC with tons of Docker containers. :-( The recommended way to install the "various packages for xPack and QEMU-ARM" is in your home folder, and not anywhere in the system path, so they do not pose any risk for the rest of the system. Eclipse knows to adjust its PATH to find them. |
Beta Was this translation helpful? Give feedback.
-
The explanation on QEMU ARM debugging involved installation of various packages for xPack and QEMU-ARM on the Host PC.
In a x86 Host PC environment, QEMU-ARM is the only alternative to run AArch64 binaries, short of having a physical AArch64-based SBC. Is there a way to leverage qemu-arm to debug AArch64 binaries inside a x86 Docker container? I much prefer using containers so as not to pollute the Host PC environment with tons of additional packages.
There is an existing facility "C/C++ Container launcher" which involves gdbserver inside a Docker container to debug a compiled binary. However it can only work with binaries for the same architecture as the Docker container (i.e., x86 binary inside a x86 docker container, or AArch64 binary inside a AArch64 docker container). I have tried this on an Apple Silicon Mac and it works.
I've tried substituting the gdbserver configuration for the "C/C++ Container launcher", on an x86 Host PC running x86 Docker containers, with qemu-arm but it looks like the output from qemu-arm gdb support is incompatible with the response that the plugin expects from an actual gdbserver process.
Beta Was this translation helpful? Give feedback.
All reactions