summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibSymbolication
AgeCommit message (Collapse)Author
2023-04-27LibSymbolication: Use `Core::File` instead of `Core::DeprecatedFile`Lucas CHOLLET
2023-03-21Everywhere: Use `LibFileSystem` where trivialCameron Youell
2023-02-19Kernel+Userland: Add constants subdirectory at /sys/kernel directoryLiav A
This subdirectory is meant to hold all constant data related to the kernel. This means that this data is never meant to updated and is relevant from system boot to system shutdown. Move the inodes of "load_base", "cmdline" and "system_mode" to that directory. All nodes under this new subdirectory are generated during boot, and therefore don't require calling kmalloc each time we need to read them. Locking is also not necessary, because these nodes and their data are completely static once being generated.
2023-02-13LibCore: Rename `File` to `DeprecatedFile`Tim Schumacher
As usual, this removes many unused includes and moves used includes further down the chain.
2023-01-26LibSymbolication: Replace uses of JsonObject::get_deprecated()/get_ptr()Sam Atkins
2023-01-22LibDebug: Propagate errors throughout DWARF parsingTim Schumacher
Splitting this into a separate commit was an afterthought, so this does not yet feature any fallible operations.
2023-01-17AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()Sam Atkins
This is a preparatory step to making `get()` return `ErrorOr`.
2022-12-28LibELF+LibSymbolication: Remove i686 supportLiav A
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-11-01Everywhere: Mark dependencies of most targets as PRIVATETim Schumacher
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
2022-10-25LibSymbolication: Use new global variables at /sys/kernel/ directoryLiav A
2022-07-27Everywhere: Make the codebase more architecture awareUndefine
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
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