Commit graph

14 commits

Author SHA1 Message Date
Andreas Kling 58fb3ebf66 LibCore+AK: Move MappedFile from AK to LibCore
MappedFile is strictly a userspace thing, so it doesn't belong in AK
(which is supposed to be user/kernel agnostic.)
2021-11-23 11:33:36 +01:00
Itamar 1c0a7cde63 LibCoredump: Add Coredump::Inspector
The coredump Inspector implements the ProcessInspector interface for
a coredump. It is implemented using Coredump::Reader.
2021-11-20 21:22:24 +00:00
Itamar ac762fbbc3 LibCoredump: Add Reader::for_each_library 2021-11-20 21:22:24 +00:00
Andreas Kling 587f9af960 AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional)
Also add slightly richer parse errors now that we can include a string
literal with returned errors.

This will allow us to use TRY() when working with JSON data.
2021-11-17 00:21:10 +01:00
Andreas Kling 80d4e830a0 Everywhere: Pass AK::ReadonlyBytes by value 2021-11-11 01:27:46 +01:00
Tim Schumacher 80cb44afae Everywhere: Move shared library checks into a common function
While we're at it, unify the various different conditions that are
scattered accross the codebase.
2021-11-10 14:42:49 +01:00
Tim Schumacher 31c634be5a LibCoredump: Restrict library name check when querying symbols
`object_name()` already returns the cleaned library name, and we
currently don't have any libraries with suffixes in /usr/lib, so we can
convert this to an `ends_with()` check.
2021-11-10 14:42:49 +01:00
Daniel Bertalan 3c3df95958 LibCoredump: Show frames from Loader.so if the crash occurs in it
Previously we rejected all entries from Loader.so even if the faulting
address was located in it, i.e. the actual issue was with the dynamic
loader. We no longer do that to make debugging Loader crashes easier.
2021-10-17 17:09:58 +01:00
Daniel Bertalan 1b63c8f3b0 LibCoredump: Accept dynamic libraries with versioned names
Our Clang toolchain uses versioned names for its shared libraries,
meaning that our applications link against `libc++.so.1.0`, not simply
`libc++.so`. Without this change, the LLVM runtime libraries are
excluded from backtraces, which makes debugging toolchain issues harder.
2021-10-17 17:09:58 +01:00
Andreas Kling 784ab75d2d LibCoredump: Don't copy uncompressed coredumps into a ByteBuffer
This was completely unnecessary and accounted for 6% of the total time
spent when loading a WebContent coredump into CrashReporter.
2021-09-22 00:40:07 +02:00
Andreas Kling f6f9599899 CrashReporter+LibCoredump: Show progress window while loading coredump
Some coredumps take a long time to symbolicate, so let's show a simple
window with a progress bar while they are loading.

I'm not super happy with the factoring of this feature, but it's an
absolutely kickass feature that makes crashing feel 100% more responsive
than before, since you now get GUI feedback almost immediately after a
crash occurs. :^)
2021-09-21 20:52:29 +02:00
Andreas Kling 38b0200151 LibCoredump: Make Backtrace getters return const references 2021-09-21 20:52:29 +02:00
Ali Mohammad Pur 97e97bccab Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
Andreas Kling bcd2025311 Everywhere: Core dump => Coredump
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.
2021-08-23 00:02:09 +02:00