1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:58:11 +00:00
serenity/Libraries/LibC/sys
Itamar 6b74d38aab 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.
2020-03-28 18:27:18 +01:00
..
arch/i386 Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
cdefs.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
file.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
ioctl.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
ioctl_numbers.h Userland: ifconfig can change the IP address of the default gateway 2020-03-15 19:09:31 +01:00
mman.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
param.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
resource.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
select.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
select.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
socket.cpp Net: Add a basic sys$shutdown() implementation 2020-02-08 00:54:43 +01:00
socket.h Kernel+LibC: Add SO_REUSEADDR macro 2020-02-20 06:57:01 +01:00
stat.h LibC: Move struct stat to sys/stat.h 2020-02-05 18:39:45 +01:00
sysmacros.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
time.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
times.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
types.h LibC: Move struct stat to sys/stat.h 2020-02-05 18:39:45 +01:00
uio.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
uio.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
un.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
utsname.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
wait.cpp Kernel+LibC: Add sys$waitid(), and make sys$waitpid() wrap it 2020-02-05 18:14:37 +01:00
wait.h Kernel+LibC: Add sys$waitid(), and make sys$waitpid() wrap it 2020-02-05 18:14:37 +01:00