I am struggling with the arm32v7/ubuntu image. My host is Win10 professional and docker with command:
docker container run --cap-add=CAP_SYS_PTRACE --security-opt seccomp=unconfined --privileged -it --name ubuntuTest -h arm32 -v /C/WS/Docker:/WS arm32v7/ubuntu
the binaries are built with crosscompiler(on host) and with gcc (on docker). The problem which I am facing with is:
root@arm32:/WS/workspace/out# gdb TCP_server_arm32.out
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from TCP_server_arm32.out...
(gdb) run
Starting program: /WS/workspace/out/TCP_server_arm32.out
warning: Could not trace the inferior process.
warning: ptrace: Function not implemented
During startup program exited with code 127.
(gdb)
for some reason, the gdb can't work. I am interested if this is because of the QEMU layer since the OS is emulated. But I have no idea what to try next. My idea was to build arm32 docker and debug applications in it with VS code.
Does someone knows how to make gdb or QEMU run with ptrace or enable ptrace somehow?
Thanks