summaryrefslogtreecommitdiff
path: root/AK/RefCounted.h
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2020-03-28 11:47:16 +0300
committerAndreas Kling <kling@serenityos.org>2020-03-28 18:27:18 +0100
commit6b74d38aab2f9479a8b4f3b9ebfb28dde166a701 (patch)
treee12ed991d2ffa9dda1bd7e44716b90bd0632aebe /AK/RefCounted.h
parentc9396be83f67edfbd07a5cd7a5b34e6be7aa81ac (diff)
downloadserenity-6b74d38aab2f9479a8b4f3b9ebfb28dde166a701.zip
Kernel: Add 'ptrace' syscall
This commit adds a basic implementation of the ptrace syscall, which allows one process (the tracer) to control another process (the tracee). While a process is being traced, it is stopped whenever a signal is received (other than SIGCONT). The tracer can start tracing another thread with PT_ATTACH, which causes the tracee to stop. From there, the tracer can use PT_CONTINUE to continue the execution of the tracee, or use other request codes (which haven't been implemented yet) to modify the state of the tracee. Additional request codes are PT_SYSCALL, which causes the tracee to continue exection but stop at the next entry or exit from a syscall, and PT_GETREGS which fethces the last saved register set of the tracee (can be used to inspect syscall arguments and return value). A special request code is PT_TRACE_ME, which is issued by the tracee and causes it to stop when it calls execve and wait for the tracer to attach.
Diffstat (limited to 'AK/RefCounted.h')
0 files changed, 0 insertions, 0 deletions