summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibSymbolication
AgeCommit message (Collapse)Author
2021-11-23LibCore+AK: Move MappedFile from AK to LibCoreAndreas Kling
MappedFile is strictly a userspace thing, so it doesn't belong in AK (which is supposed to be user/kernel agnostic.)
2021-11-17AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional)Andreas Kling
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-08AK: Use ErrorOr<T> for MappedFile factoriesAndreas Kling
Replace Result<T, E> with ErrorOr<T> and propagate the error to callers.
2021-10-17LibSymbolication: Skip source position calculation if requestedRodrigo Tobar
Calculating source code positions can be expensive, and some applications (like SystemMonitor's Stack tab) don't even show this information, making these calculations wasteful. This commit adds a new enumerated flag to the `symbolicate` functions for callers to specify whether source positions should be included in the results; it defaults to "Yes" to preserve old behavior for existing applications.
2021-10-15LibSymbolication: Make Symbol comparableRodrigo Tobar
All its members are comparable themselves, so this can be defaulted. Making it comparable will allow us, among other things, to check if a list of symbols (i.e., the result of calling the symbolicate functions) is equal or not to another, which in turn will allow us to avoid refreshing the SystemMonitor's Stack tab when successive symbolicated stacks are the same.
2021-09-30LibSymbolication+SystemMonitor: Show ELF object in stackRodrigo Tobar
This small patch allows SystemMonitor's Stack tab to show the name of the ELF object to which the displayed address refers to. This gives a bit more of contextual information to the viewer. A better to show this is probably a table, but I'm not that familiar yet with the GUI framework in general, so I'm keeping things simple.
2021-09-28LibSymbolication: Look for libraries under /usr/local/libRodrigo Tobar
While trying to investigate a problem with the ssl module in the python port I found that the SystemMonitor Stack tab for a process wouldn't show the symbols for the libssl and libcrypto shared libraries that are installed under /usr/local/lib. The main reason for this is that LibSymbolication didn't look for libraries under /usr/local/lib. This commit adds support for looking for libraries under /usr/local/lib. Absolute paths are still respected, and lookup gives precedence to /usr/lib, just like dynamic linker does.
2021-09-28LibSymbolication: Return empty value on errorRodrigo Tobar
This was probably the intended behavior, but a return statement was missing.
2021-09-04LibSymbolication: Unbreak symbolication with `-z separate-code` linkingAndreas Kling
We were incorrectly assuming that the mapped .text segment for an ELF image was always at the base of the image mapping. Now that we have .rodata mappings as well, it's possible for one of them to come before the .text.
2021-08-06LibDebug+Everywhere: Make DebugInfo not own the ELF imageAli Mohammad Pur
This is required to avoid copying the image where otherwise a reference would be enough.
2021-07-27Kernel: Support loading the kernel at almost arbitrary virtual addressesGunnar Beutner
This enables further work on implementing KASLR by adding relocation support to the pre-kernel and updating the kernel to be less dependent on specific virtual memory layouts.
2021-07-27LibSymbolication: Fix integer overflow when calculating region addressesGunnar Beutner
2021-07-22Userland: Use /proc/kernel_base to determine the kernel base addressGunnar Beutner
This removes all the hard-coded kernel base addresses from userspace tools. One downside for this is that e.g. Profiler no longer uses a different color for kernel symbols when run as a non-root user.
2021-07-22AK: Add a getter to JsonValue to get machine-native addressesGunnar Beutner
2021-07-20Userland: Hardcode the x86_64 kernel base address for nowGunnar Beutner
2021-07-18Kernel: Split debug symbols into a separate fileGunnar Beutner
This speeds up the boot process considerably when specifying the kernel image via -initrd.
2021-06-24LibSymbolication: Fix incorrect argument type for symbolicate()Gunnar Beutner
2021-06-20LibCoreDump: Don't subtract one from the first stack frame's EIPGunnar Beutner
The first stack frame represents the current instruction pointer rather than the return address so we shouldn't subtract one from it. Fixes #8162.
2021-06-19LibSymbolication+Utilities: Show inlined functions for btGunnar Beutner
2021-06-19LibDebug: Store LibDebug objects on the heap & make them non-copyableItamar
This fixes an issue were some LibDebug objects (for example, Dwarf::CompilationUnit) held a reference to their parent Dwarf::DwarfInfo object, which was constructed on the stack and later moved to the heap.
2021-05-22LibSymbolication: Rename Client.{cpp,h} => Symbolication.{cpp,h}Andreas Kling
2021-05-22LibSymbolication: Name the shared object libsymbolication.soAndreas Kling
2021-05-22LibSymbolication+SystemMonitor+bt: Move symbolication back in-processAndreas Kling
Process-separated symbolication was cute, but ultimately the threat model is kinda silly. We're already *running* the binary, but we're afraid to parse its symbol table? :^) This commit makes SystemMonitor and bt do symbolication in-process. SymbolServer and the symbol user will be removed separately.
2021-05-22Userland: Rename LibSymbolClient => LibSymbolicationAndreas Kling