How to solve “ptrace operation not permitted” when trying to attach GDB to a process?

前端 未结 13 2220
予麋鹿
予麋鹿 2020-11-30 18:28

I\'m trying to attach a program with gdb but it returns:

Attaching to process 29139
Could not attach to process. If your uid matches the ui

13条回答
  •  星月不相逢
    2020-11-30 18:59

    If you are using Docker, you will probably need these options:

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

提交回复
热议问题