c - syscalls with PTRACE_ATTACH -
i have simple question ptrace please. here simple source code in c:
ptrace(ptrace_attach, pid, 0, 0); int status; waitpid(pid, &status, wstopped); while (1) { ptrace(ptrace_singlestep, pid, 0, 0); "here must display message when syscall executed." }
i want know must add in loop write message (for example "ok") when process associated pid in parameter uses syscall, without using ptrace_syscall...does have idea? example return value of call ptrace(ptrace_peekuser...) , if value not equal -1... i want return value of each syscall in process pid without using ptrace_sycall , using ptrace_attach. give thanks.
Comments
Post a Comment