c++ - Why can't gdb attach to server application summoned with inetd? -
I have a server application that can be called for the client to use inetd. However, if I try to attach the launched server process with Inset, then I get the following response: ptrace: Operation is not allowed.
gdb --annotate = 3 / my / app / here & lt; Process ID & gt; Current directory / usr / local / bin / gnu gdb 6.8 Copyright (c) 2008 Free Software Foundation, Inc. License GPLV3 +: GNU GPL version 3 or later & lt; Http: //gnu.org/licenses/gpl.html> It's free software: You are free to change and redistribute it. There is no warranty to the extent permitted by law, type "show copy" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu" ... / usr / local / Reading symbols from bin / flumed..done Using the host library / db library "/lib/tls/libthread_db.so.1" Attached in the program: / my / app / here, process & lt; ProcessId> Ptrace: Operation not allowed / Usr / local / bin / & lt; ProcessId>: No such file or directory (GDB)
For me The solution was:
echo 0 | Sudo t / proc / sys / kernel / yama / ptrace_scope
Comments
Post a Comment