summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibDebug
AgeCommit message (Collapse)Author
2023-02-24HackStudio: Add 'pause debuggee' buttonItamar
This button sends a SIGSTOP to the debugged process, which pauses it. The debuggee can be resumed with the 'continue' button.
2023-02-24HackStudio: Add progress bar to Debugger initializationItamar
During Debugger initialization, most of the time is spent creating DebugInfo objects for the libraries that the program has loaded.
2023-02-24LibDebug: Remove file path fixup for library sourcesItamar
It's no longer needed as the file paths we get for libraries in the current build process is canonical.
2023-02-13Everywhere: Remove the `AK::` qualifier from Stream usagesTim Schumacher
2023-02-13LibCore: Remove `Stream.h`Tim Schumacher
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-02-08LibDebug: Add static attach() functionItamar
This function is similar to exec_and_attach(), but instead of spawning a new process and debugging it, it attaches to an existing process.
2023-02-08AK: Remove the fallible constructor from `FixedMemoryStream`Tim Schumacher
2023-02-04AK: Make LEB128 decoding work with `read_value`Tim Schumacher
2023-02-04AK: Port `LEB128` to the new `AK::Stream`Tim Schumacher
2023-01-29AK: Move memory streams from `LibCore`Tim Schumacher
2023-01-29AK: Move `Stream` and `SeekableStream` from `LibCore`Tim Schumacher
`Stream` will be qualified as `AK::Stream` until we remove the `Core::Stream` namespace. `IODevice` now reuses the `SeekMode` that is defined by `SeekableStream`, since defining its own would require us to qualify it with `AK::SeekMode` everywhere.
2023-01-29LibDebug: Correct a (un-)signed mixup in the DWARF abbreviations mapTim Schumacher
I accidentally replaced this with `read_unsigned` in 908b88db347e932934ee311be8d3920cabbe8886, now it's correct again.
2023-01-26LibDebug: Replace uses of JsonObject::get_deprecated()/get_ptr()Sam Atkins
2023-01-24LibDebug: Pass `read_from_stream` calls through `read_value` insteadTim Schumacher
2023-01-22LibDebug: Use `Core::Stream` to read opcodes for expression evaluationTim Schumacher
2023-01-22LibDebug: Port the rest of DWARF parsing to `Core::Stream`Tim Schumacher
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-22LibDebug: Parse DWARF address ranges using `Core::Stream`Tim Schumacher
2023-01-22LibDebug: Use `Core::Stream` to read the DWARF abbreviations mapTim Schumacher
2023-01-19LibDebug: Identify embedded resources with a preceding dotTim Schumacher
2023-01-19LibDebug: Factor out the "looks like embedded resource" conditionTim Schumacher
2023-01-17AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()Sam Atkins
This is a preparatory step to making `get()` return `ErrorOr`.
2023-01-09AK+Everywhere: Rename FlyString to DeprecatedFlyStringTimothy Flynn
DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so let's rename it to A) match the name of DeprecatedString, B) write a new FlyString class that is tied to String.
2023-01-07Everywhere: Remove "LibC/" includes, add lint-rule against itBen Wiederhake
2022-12-28LibDebug: Remove i686 supportLiav A
2022-12-28Kernel+Userland: Remove dependency on i386-specific registersLiav 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-06Everywhere: Remove redundant inequality comparison operatorsDaniel Bertalan
C++20 can automatically synthesize `operator!=` from `operator==`, so there is no point in writing such functions by hand if all they do is call through to `operator==`. This fixes a compile error with compilers that implement P2468 (Clang 16 currently). This paper restores the C++17 behavior that if both `T::operator==(U)` and `T::operator!=(U)` exist, `U == T` won't be rewritten in reverse to call `T::operator==(U)`. Removing `!=` operators makes the rewriting possible again. See https://reviews.llvm.org/D134529#3853062
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-11-01Everywhere: Explicitly link all binaries against the LibC targetTim Schumacher
Even though the toolchain implicitly links against -lc, it does not know where it should get LibC from except for the sysroot. In the case of Clang this causes it to pick up the LibC stub instead, which might be slightly outdated and feature missing symbols. This is currently not an issue that manifests because we pass through the dependency on LibC and other libraries by accident, which causes CMake to link against the LibC target (instead of just the library), and thus points the linker at the build output directory. Since we are looking to fix that in the upcoming commits, let's make sure that everything will still be able to find the proper LibC first.
2022-10-14AK+Userland: Stub out code that isn't currently implemented on AARCH64Gunnar Beutner
Even though this almost certainly wouldn't run properly even if we had a working kernel for AARCH64 this at least lets us build all the userland binaries.
2022-10-04AK+Everywhere: Add AK_COMPILER_{GCC,CLANG} and use them most placesNico Weber
Doesn't use them in libc headers so that those don't have to pull in AK/Platform.h. AK_COMPILER_GCC is set _only_ for gcc, not for clang too. (__GNUC__ is defined in clang builds as well.) Using AK_COMPILER_GCC simplifies things some. AK_COMPILER_CLANG isn't as much of a win, other than that it's consistent with AK_COMPILER_GCC.
2022-09-17LibDebug: Break inclusion cycle through many forward-declarationsBen Wiederhake
2022-09-17Everywhere: Fix badly-formatted includesBen Wiederhake
2022-07-27Everywhere: Make the codebase more architecture awareUndefine
2022-07-12Everywhere: Replace single-char StringView op. arguments with charssin-ack
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
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-07-03LibDebug: Make sure current_breakpoint has value before usageMarcus Nilsson
Previously this caused a crash when no breakpoint was active since we tried to get value().address before the has_value() check.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-10Libraries: Use default constructors/destructors in LibDebugLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2022-01-28LibDebug+LibCoredump: Replace remaining reinterpret_casts and C castsAli Mohammad Pur
You misused your toys and I'm now taking them away, reflect on what you did wrong for a bit.
2022-01-28LibDebug+LibCoredump: Use ByteReader to do unaligned readsAli Mohammad Pur
The previous solution of "lol whats a UB" was not nice and tripped over itself when it was run under UBSAN, fix this by doing explicit byte-by-byte reads where needed.
2022-01-28LibDebug+Everywhere: Avoid void* -> FlatPtr -> void* danceAli Mohammad Pur
And limit the `void*` to the functions that interface the system (i.e. ptrace wrappers). This generally makes the code less riddled with casts.
2022-01-07Everywhere: Fix spelling mistakesmjz19910
2022-01-07Everywhere: Fix many spelling errorsmjz19910
2021-12-22LibDebug: Add optional setup_child() callback to debuggerItamar
If set, this callback gets called right after fork() in the child process. It can be used by the caller if it wants to perform some logic in the child process before it starts executing the debuggee program.
2021-12-15LibDebug: Handle DWARF 4 address rangesDaniel Bertalan
The format of the address range section is different between DWARF version 4 and version 5. This meant that we parsed programs compiled with `-gdwarf-4` incorrectly.
2021-12-15LibDebug: Fix truncation in ExtendedOpcodes::SetDiscriminatorDaniel Bertalan
The parameter of this operator is an unsigned LEB128 integer, so it can be more than 1 byte in length. If we only read 1 byte, we might mess up the offsets for the instructions following it.