summaryrefslogtreecommitdiff
path: root/Kernel/Coredump.h
AgeCommit message (Collapse)Author
2022-08-20Kernel: Make self-contained locking smart pointers their own classesAndreas Kling
Until now, our kernel has reimplemented a number of AK classes to provide automatic internal locking: - RefPtr - NonnullRefPtr - WeakPtr - Weakable This patch renames the Kernel classes so that they can coexist with the original AK classes: - RefPtr => LockRefPtr - NonnullRefPtr => NonnullLockRefPtr - WeakPtr => LockWeakPtr - Weakable => LockWeakable The goal here is to eventually get rid of the Lock* classes in favor of using external locking.
2021-11-08Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T>Andreas Kling
We now use AK::Error and AK::ErrorOr<T> in both kernel and userspace! This was a slightly tedious refactoring that took a long time, so it's not unlikely that some bugs crept in. Nevertheless, it does pass basic functionality testing, and it's just real nice to finally see the same pattern in all contexts. :^)
2021-09-30Kernel: Exclude userspace heap memory from coredumps by defaultAndreas Kling
When a process with a large heap crashes (e.g WebContent), it gets very cumbersome to dump out a huge amount of memory. In the vast majority of cases, we're only interested in generating a nice backtrace from the coredump, so let's have the kernel skip over userspace heap regions when dumping memory for now. This is not ideal, and almost a little bit ugly, but it does make investigating 500 MiB WebContent crashes significantly easier for now.
2021-09-07Kernel: Rename FileDescription => OpenFileDescriptionAndreas Kling
Dr. POSIX really calls these "open file description", not just "file description", so let's call them exactly that. :^)
2021-09-07Kernel: Remove redundant [[nodiscard]] on KResult return valuesAndreas Kling
Both KResult and KResultOr are [[nodiscard]] at the class level, so there's no need to have functions return `[[nodiscard]] KResult`.
2021-09-06Kernel: Don't allocate so much when generating coredumpsAndreas Kling
Instead of creating a bunch of ByteBuffers and concatenating them to generate the "notes" segment, we now simply create a KBufferBuilder and tell each of the notes generator helpers to write into the builder. This allows the code to flow more naturally, with some bonus additional error propagation. :^)
2021-09-06Kernel: Tidy up Coredump constructionAndreas Kling
- Use KResultOr and TRY to propagate errors - Return more specific errors now that they have a path out from here
2021-09-06Everywhere: Use OOM-safe ByteBuffer APIs where possibleAli Mohammad Pur
If we can easily communicate failure, let's avoid asserting and report failure instead.
2021-08-23Everywhere: Core dump => CoredumpAndreas Kling
We all know what a coredump is, and it feels more natural to refer to it as a coredump (most code already does), so let's be consistent.