Open jcelerier opened 3 years ago
Can you provide the exact steps that brought you to the error? I can try to reproduce.
I'll look into my bash history !
pi $ git clone git://github.com/fsquillace/junest ~/.local/share/junest
pi $ export PATH=~/.local/share/junest/bin:$PATH
pi $ junest setup
pi $ junest -f
junest-root $ pacman -S gdb
junest-root $ exit
pi $ junest
junest $ gdb
(gdb) attach <some pid>
Attaching to process <...>
ptrace: Operation not permitted.
Not all processes can be debugged. Consider that this can happen even if you try using gdb
outside junest
, I'd suggest to try that first if you can.
In order to enable ptrace capabilities in junest you'd need to run something like:
junest -f -b "--cap-add ALL"
I am inclined to use it --cap-add ALL
as default option when running as fakeroot. I will check if there are no side-effects.
Not all processes can be debugged. Consider that this can happen even if you try using gdb outside junest, I'd suggest to try that first if you can.
I can debug the process I want with my Pi's /usr/bin/gdb without issues (except that it's too old for the DWARF-5 debug info format used by the app I want to debug)
I'll try the ptrace thing, thanks !
Cool, thanks. Let me know if that works :crossed_fingers:
In the latest junest change I put --cap-add ALL
as default to the ns fakeroot mode.
Hello,
I installed Junest in the hope of being able to use GDB 10 on my raspberry pi (running Debian Buster). If I run Debian's gdb 8 I can attach to my process. But if I run under junest's gdb 10.2, then I get a "ptrace: operation not permitted" error. I tried running under root and junest -f but that did not change anything.
What else could I look at ?
Thanks !