summaryrefslogtreecommitdiff
path: root/Kernel/API
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-11-25 22:55:12 +0100
committerAndreas Kling <kling@serenityos.org>2021-12-05 22:59:09 +0100
commit0f8483f09ce079b5c8b1531867917f282996b2fd (patch)
treee889820a2b17967681a6be426aeeaefbed7617d4 /Kernel/API
parent3e223185b3b6bf96b0b86a3be0ad626193ef85d4 (diff)
downloadserenity-0f8483f09ce079b5c8b1531867917f282996b2fd.zip
Kernel: Implement new ptrace function PT_PEEKBUF
This enables the tracer to copy large amounts of data in a much saner way.
Diffstat (limited to 'Kernel/API')
-rw-r--r--Kernel/API/POSIX/sys/ptrace.h3
-rw-r--r--Kernel/API/Syscall.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/Kernel/API/POSIX/sys/ptrace.h b/Kernel/API/POSIX/sys/ptrace.h
index 8b9c0c0546..c27604bf0a 100644
--- a/Kernel/API/POSIX/sys/ptrace.h
+++ b/Kernel/API/POSIX/sys/ptrace.h
@@ -21,8 +21,11 @@ extern "C" {
#define PT_PEEK 7
#define PT_POKE 8
#define PT_SETREGS 9
+
+// Serenity extensions:
#define PT_POKEDEBUG 10
#define PT_PEEKDEBUG 11
+#define PT_PEEKBUF 12
#define PT_READ_I PT_PEEK
#define PT_READ_D PT_PEEK
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index 63d3050e2f..bacfc5c750 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -458,6 +458,10 @@ struct SC_stat_params {
int follow_symlinks;
};
+struct SC_ptrace_buf_params {
+ MutableBufferArgument<u8, size_t> buf;
+};
+
struct SC_ptrace_params {
int request;
pid_t tid;