问题
In ptrace I can debug another process to print all the syscall numver that the remote process call.l , with this steps.
- Attach to process with PTRACE_ATTACH.
waitpid
(with `__WALL flags) to be sure the remote process has been stopped.- In while (cond) print on register that store the syscall number with PTRACE_PEEKUSER
How the remote process can prevent that ?is there any signal that it can to register and print "stop debug me!!"??
PTRACE_ATTACH send SIGSTOP for remote process,but process can't handle that. And PTRACE_PEEKUSER do not send any signal to remote process.
来源:https://stackoverflow.com/questions/61667231/how-to-prevent-another-process-to-debug-syscall-with-ptrace