Comment
Comment by ysfr
Yes. Or if it's using dynamic libraries and not compiled static, you can use LD_PRELOAD and overwrite ptrace() to do nothing. You don't have to patch anything then, which might be easier.
And compile it:
Afterwards you can eiher
or for gdb