gdb and server as a static binary
gdb & gdbserver, the go-to debugging tools for GNU/Linux and *BSD systems.
This provides a minimalized and static build for all supported systems.
Note: To use this debugger, please start it outside of confinement, ie execute it directly:
/snap/gdb-static/current/usr/bin/gdb
/snap/gdb-static/current/usr/bin/gdbserver
You can also add them to your PATH for easy access:
export PATH="$PATH:/snap/gdb-static/current/usr/bin"