summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibDebug
AgeCommit message (Collapse)Author
2021-05-16Userland: Add missing #includesGunnar Beutner
These two header files relied on transitive header includes.
2021-05-15LibDebug: Avoid unnecessary String allocation in append_to_line_info()Andreas Kling
This code path is very hot, and since we're seeing a lot of the same strings repeatedly (and they're heading into a FlyString for storage) let's construct those using FlyString(StringView) to avoid temporary String objects.
2021-05-15Everywhere: Add a blank line after copyright header where missingLinus Groh
2021-05-15LibELF: Remove sketchy use of "undefined" ELF::Image::SectionAndreas Kling
We were using ELF::Image::section(0) to indicate the "undefined" section, when what we really wanted was just Optional<Section>. So let's use Optional instead. :^)
2021-05-12LibCore+Everywhere: Move OpenMode out of IODeviceAli Mohammad Pur
...and make it an enum class so people don't omit "OpenMode".
2021-05-03LibDebug: add DW_LNS_set_basic_block supportspigwitmer
This adds support for the basic_block register to the Dwarf line number state machine.
2021-05-03Userland: Fix 64-bit portability issuesGunnar Beutner
2021-05-01Everywhere: Turn #if *_DEBUG into dbgln_if/if constexprGunnar Beutner
2021-04-29Everywhere: "file name" => "filename"Andreas Kling
2021-04-29LibDebug: Implement support for AttributeDataForm::ImplicitConstGunnar Beutner
While symbolicating a crash dump for UserspaceEmulator I came across another data form we didn't support. ImplicitConst encodes a LEB128 value in the abbreviation record rather than - like all other values - in the .debug_info section.
2021-04-28LibDebug: Implement support for AttributeDataForm::{UData,LineStrP}Gunnar Beutner
2021-04-28LibDebug: Implement support for DWARF 5 line programsGunnar Beutner
2021-04-28LibDebug: Implement support for DWARF 5 compilation unit headersGunnar Beutner
2021-04-28LibDebug: Move UnitHeader32 out of the LineProgram classGunnar Beutner
2021-04-28LibDebug: Move get_attribute_value to the DwarfInfo classGunnar Beutner
2021-04-25Everywhere: Remove empty line after function body opening curly braceLinus Groh
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-21LibDebug: Convert String::format() => String::formatted()Andreas Kling
2021-04-21HackStudio+LibDebug: Support stopping a debugged processFalseHonesty
In LibDebug this required implementing the Kill debug action, and in HackStudio this required making the toolbar's stop action stop the debugger if active.
2021-04-18LibDebug: Implement ability to set watchpointsFalseHonesty
Now we can set hardware watchpoints for our variables! :^) These watchpoints will be automatically removed when they go out of scope.
2021-04-18LibDebug: Implement support for AttributeDataForm::Data8Gunnar Beutner
I came across this while analyzing a crash dump for openttd.
2021-04-16LibDebug/Dwarf: Use dbgln_if() instead of '#if DWARF_DEBUG'AnotherTest
2021-04-16LibDebug: Add support for StandardOpcodes::FixAdvancePcGunnar Beutner
2021-04-16LibDebug: Add array bounds check for m_source_filesGunnar Beutner
2021-04-16LibDebug: Fix typo in handle_special_opcode method nameFalseHonesty
handle_sepcial_opcode -> handle_special_opcode :)
2021-04-14LibDebug: Add support for parsing array typesFalseHonesty
This includes multi-dimensional arrays :O
2021-04-14LibDebug: Support unnamed variables and typesFalseHonesty
We were supposed to already support unnamed types, but due to a little typo, we were actually causing more problems :^)
2021-04-12LibDebug: Stop parsing unhandled variable typesFalseHonesty
Previously, when trying to debug variables with more complex types (such as String), we would crash the debugger simply because it didn't know how to handle types that were irrelevant anyways. Now we just skip data we don't yet know how to handle.
2021-04-12LibDebug+HackStudio: Fix crashes relating to debugger variable previewFalseHonesty
For one, viewing a variable who's type contained a subprogram will no longer crash HackStudio. Additionally, the variable view will handle invalid enum values gracefully now, fixing another crash. Finally, deeply nested (nest count > 1) structures will have their memory addresses properly set, fixing the final crash I found.
2021-03-17Everywhere: Remove pessimizing and redundant move()Andreas Kling
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-23LibDebug: Fix build with -O2Andreas Kling
It turns out that LibDebug was the only thing that couldn't be built with -O2. We were neglecting to deal with some stream read errors.
2021-02-08Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...)AnotherTest
Replacement made by `find Kernel Userland -name '*.h' -o -name '*.cpp' | sed -i -Ee 's/dbgln\b<(\w+)>\(/dbgln_if(\1, /g'`
2021-01-25Everywhere: Debug macros instead of constexpr.asynts
This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
2021-01-25Everywhere: Name debug macros more consistently.asynts
Personally, I prefer the naming convention DEBUG_FOO over FOO_DEBUG, but the majority of the debug macros are already named in the latter naming convention, so I just enforce consistency here. This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/DEBUG_PATH/PATH_DEBUG/' {} \;
2021-01-25Everywhere: Use CMake to generate AK/Debug.h.asynts
This was done with the help of several scripts, I dump them here to easily find them later: awk '/#ifdef/ { print "#cmakedefine01 "$2 }' AK/Debug.h.in for debug_macro in $(awk '/#ifdef/ { print $2 }' AK/Debug.h.in) do find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/#ifdef '$debug_macro'/#if '$debug_macro'/' {} \; done # Remember to remove WRAPPER_GERNERATOR_DEBUG from the list. awk '/#cmake/ { print "set("$2" ON)" }' AK/Debug.h.in
2021-01-22Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
2021-01-22Everywhere: Fix typosLinus Groh
2021-01-22LibDebug: Don't assert when running on non-existent executableMaciej Zygmanowski
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling