ladybird/AK
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
..
Tests AK: Add FlyString, a simple flyweight string class 2020-03-22 13:03:43 +01:00
Assertions.h AK: Apply changes for the Bootstrapper environment 2020-02-09 19:38:17 +01:00
Atomic.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Badge.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
BinarySearch.h Kernel: Optimize VM range deallocation a bit 2020-01-19 13:29:59 +01:00
Bitmap.h AK: Use default constructor of Optional if an unset bit is not found 2020-03-08 14:13:30 +01:00
BufferStream.h AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
ByteBuffer.h AK: Use __builtin_memset() and such to reduce header dependencies 2020-03-08 13:06:51 +01:00
CircularDeque.h AK: Add enqueue_begin() for the CircularDeque class (#1320) 2020-03-02 09:50:43 +01:00
CircularQueue.h CircularQueue: Move construct a T object instead of copy constructing it 2020-02-26 15:22:45 +01:00
Demangle.h AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
DoublyLinkedList.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Error.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
FileSystemPath.cpp AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
FileSystemPath.h AK: Add a forward declaration header 2020-02-14 23:31:18 +01:00
FixedArray.h Kernel: Use a FixedArray for a process's extra GIDs 2020-02-18 11:35:47 +01:00
FlyString.cpp AK: Add some string comparison operators 2020-03-28 09:11:13 +01:00
FlyString.h AK: Add some string comparison operators 2020-03-28 09:11:13 +01:00
Forward.h AK: Add FlyString, a simple flyweight string class 2020-03-22 13:03:43 +01:00
Function.h Add clang-format file 2019-05-28 17:31:20 +02:00
HashFunctions.h AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*) 2020-03-08 13:06:51 +01:00
HashMap.h AK: Make HashTable and HashMap use size_t for size and capacity 2020-02-24 09:42:52 +01:00
HashTable.h AK: Expose SinglyLinkedListIterator constructor 2020-02-27 10:21:13 +01:00
IDAllocator.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
InlineLinkedList.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
IntrusiveList.h LibCore: Add a forward declaration header 2020-02-14 23:31:18 +01:00
IPv4Address.h AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
IterationDecision.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
JsonArray.h AK: Simplify JsonObject and JsonArray API a little bit 2020-03-06 08:51:22 +01:00
JsonArraySerializer.h Meta: Claim copyright for files created by me 2020-01-24 15:15:16 +01:00
JsonObject.h AK: Add get_or() method to JsonObject 2020-03-24 22:20:07 +01:00
JsonObjectSerializer.h AK: Add JsonObjectSerializer::add(key, bool) overload 2020-02-08 02:48:27 +01:00
JsonParser.cpp AK: Fix JsonParser kernel build (no floats/doubles in kernel code) 2020-03-24 22:37:24 +01:00
JsonParser.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
JsonValue.cpp AK: Apply changes for the Bootstrapper environment 2020-02-09 19:38:17 +01:00
JsonValue.h AK: Add a forward declaration header 2020-02-14 23:31:18 +01:00
kmalloc.h AK: Have AK/kmalloc.h #include <new> on other platforms 2020-02-25 15:58:24 +01:00
kstdio.h AK: Don't bring in LibBareMetal's kstdio.h in userspace 2020-02-15 19:18:56 +01:00
LogStream.cpp AK: Add FlyString::to_lowercase() and LogStream operator<<(FlyString) 2020-03-22 19:07:02 +01:00
LogStream.h AK: Add FlyString::to_lowercase() and LogStream operator<<(FlyString) 2020-03-22 19:07:02 +01:00
Makefile Build: clean up build system, use one shared Makefile 2019-12-20 20:20:54 +01:00
MappedFile.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
MappedFile.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Memory.h AK: Move memory stuff (fast memcpy, etc) to a separate header 2020-03-08 13:06:51 +01:00
NetworkOrdered.h AK: Use endianness flags to determine if conversion is necessary 2020-02-19 16:08:28 +01:00
NeverDestroyed.h AK: Fixed a typo in NeverDestroyed.h (#1228) 2020-02-16 09:32:18 +01:00
Noncopyable.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
NonnullOwnPtr.h AK: Remove bitrotted Traits::dump() mechanism 2020-02-10 11:55:34 +01:00
NonnullOwnPtrVector.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
NonnullPtrVector.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
NonnullRefPtr.h AK: Let's call decrementing reference counts "unref" instead of "deref" 2020-01-23 15:14:21 +01:00
NonnullRefPtrVector.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Optional.h AK: Move memory stuff (fast memcpy, etc) to a separate header 2020-03-08 13:06:51 +01:00
OwnPtr.h AK: Add ptr_hash to use int_hash or u64_hash depending on pointer size 2020-02-25 15:32:58 +01:00
Platform.h AK: Use endianness flags to determine if conversion is necessary 2020-02-19 16:08:28 +01:00
PrintfImplementation.h AK: Use print_string() for %c formatting 2020-03-26 08:01:16 +01:00
Queue.h AK: Make Queue use size_t for its size 2020-02-25 14:55:04 +01:00
QuickSort.h AK: Make quick_sort() a little more ergonomic 2020-03-03 16:02:58 +01:00
RefCounted.h AK: Apply changes for the Bootstrapper environment 2020-02-09 19:38:17 +01:00
RefPtr.h AK: Add ptr_hash to use int_hash or u64_hash depending on pointer size 2020-02-25 15:32:58 +01:00
Result.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
ScopedValueRollback.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
ScopeGuard.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
SharedBuffer.cpp Kernel: Merge the shbuf_get_size() syscall into shbuf_get() 2020-02-28 12:55:58 +01:00
SharedBuffer.h Kernel+LibC: Rename shared buffer syscalls to use a prefix 2020-02-28 12:55:58 +01:00
SinglyLinkedList.h AK: Move memory stuff (fast memcpy, etc) to a separate header 2020-03-08 13:06:51 +01:00
StdLibExtras.h AK: Move memory stuff (fast memcpy, etc) to a separate header 2020-03-08 13:06:51 +01:00
String.cpp AK: Add some string comparison operators 2020-03-28 09:11:13 +01:00
String.h AK: Add some string comparison operators 2020-03-28 09:11:13 +01:00
StringBuilder.cpp AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
StringBuilder.h AK: Add StringBuilder::join() for joining collections with a separator 2020-03-20 14:41:23 +01:00
StringImpl.cpp AK: Add FlyString, a simple flyweight string class 2020-03-22 13:03:43 +01:00
StringImpl.h AK: Add FlyString, a simple flyweight string class 2020-03-22 13:03:43 +01:00
StringUtils.cpp AK: Add FlyString::equals_ignoring_case(StringView) 2020-03-22 13:07:45 +01:00
StringUtils.h AK: Add FlyString::equals_ignoring_case(StringView) 2020-03-22 13:07:45 +01:00
StringView.cpp AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
StringView.h AK: Add FlyString::equals_ignoring_case(StringView) 2020-03-22 13:07:45 +01:00
TemporaryChange.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
TestSuite.h AK: Move the wildcard-matching implementation to StringUtils 2020-03-02 10:38:08 +01:00
Time.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Traits.h AK: Add HashMap, HashTable and Traits to Forward.h 2020-02-16 02:01:18 +01:00
Types.h Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
URL.cpp AK: Make Vector use size_t for its size and capacity 2020-02-25 14:52:35 +01:00
URL.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Utf8View.cpp AK, LibGfx, LibGUI: Initialize various variables to zero. 2020-02-25 10:18:46 +01:00
Utf8View.h Meta: Claim copyright for files created by me 2020-01-24 15:15:16 +01:00
Vector.h AK: Use __builtin_memset() and such to reduce header dependencies 2020-03-08 13:06:51 +01:00
Weakable.h AK: Make sure that Weakable always has the same memory layout 2020-02-15 14:49:57 +01:00
WeakPtr.h AK: Assert if trying to create a WeakPtr to an object being destroyed 2020-01-25 10:34:32 +01:00