I did actually find that stackoverflow post and tried spinning up a new container but the results don't provide any useful information...

/ # /tmp/ld-musl-armhf.so.1 /usr/bin/gdb --args ls -l /tmp
GNU gdb (GDB) 12.1
Copyright (C) 2022 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 "armv7-alpine-linux-musleabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://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 ls...
(No debugging symbols found in ls)
(gdb) run
Starting program: /bin/ls -l /tmp
During startup program terminated with signal SIGSEGV, Segmentation fault.

On Fri, Jan 12, 2024 at 12:57 PM Szabolcs Nagy <nsz@port70.net> wrote:
* Cody Wetzel <codyawetzel@gmail.com> [2024-01-11 12:19:16 -0600]:
> Sorry, I'm definitely not that well versed in linux.  I received the
> following...
>
> / # /tmp/ld-musl-armhf.so.1 /usr/bin/gdb --args ls -l /tmp
> > GNU gdb (GDB) 12.1
> > Copyright (C) 2022 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 "armv7-alpine-linux-musleabihf".
> > Type "show configuration" for configuration details.
> > For bug reporting instructions, please see:
> > <https://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 ls...
> > (No debugging symbols found in ls)
> > (gdb) run
> > Starting program: /bin/ls -l /tmp
> > warning: Error disabling address space randomization: Operation not
> > permitted
> > warning: Could not trace the inferior process.
> > warning: ptrace: Operation not permitted
> > warning: Error restoring address space randomization: Operation not
> > permitted
> > During startup program exited with code 127.

use a container that's not restricted e.g.

docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined

(i found this with 2min web search)


--
Cody Wetzel
codyawetzel@gmail.com
(402)490-9242