This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Downloading separate debug info for /usr/bin/php7.4
(No debugging symbols found in /usr/bin/php7.4)
(gdb) attach 350091
Attaching to program: /usr/bin/php7.4, process 350091
ptrace: Operation not permitted.
(gdb) quit
maybe this happened because run without root/sudo, so we need disable ptrace. but even i run with sudo/root the others prblm comes
$ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
Here full refference about yama ptrace restriction