summaryrefslogtreecommitdiff
path: root/Libraries/LibDebug
AgeCommit message (Collapse)Author
2020-06-03LibDebug: Add all Dwarf v5 attributes, tags, and form enum valuesFalseHonesty
2020-06-03LibDebug: Add support for enum value typesFalseHonesty
Additionally, we will parse and expose the types of variables if they are complex, like Enums or Structs. Variables of an enum type are special in that they do not store all the members of said enum in their own VariableInfo like Structs do, rather, all of the values are stored in the VariableInfo for the Enum.
2020-05-29Meta: Add a script check the presence of "#pragma once" in header filesEmanuele Torre
.. and make travis run it. I renamed check-license-headers.sh to check-style.sh and expanded it so that it now also checks for the presence of "#pragma once" in .h files. It also checks the presence of a (single) blank line above and below the "#pragma once" line. I also added "#pragma once" to all the files that need it: even the ones we are not check. I also added/removed blank lines in order to make the script not fail. I also ran clang-format on the files I modified.
2020-05-24LibDebug: Make sure to not single step the program twiceItamar
After hitting a breakpoint, we single step the program to execute the instruction we breaked on and re-enable the breakpoint. We also single step the program when the user of LibDebug returned a DebugDecision::SingleStep. Previously, if we hit a breakpoint and then were asked to to a DebugDecision::SingleStep, we would single step twice. This bug can actually crash programs, because it might cause us to skip over a patched INT3 instruction in the second single-step. Interestingely enough, this bug manifested as functrace crashing certain programs: after hitting a breakpoint on a CALL instruction, functrace single steps the program to see where the CALL jumps to (yes, this can be optimized :D). functrace crashed when a CALL instruction jumps to another CALL, because it inserts breakpoints on CALL instructions, and so the INT3 in the 2nd CALL was skipped over, and we executed garbage :). This commit fixes this by making sure not to single-step twice.
2020-05-24LibDebug: Tolerate missing debug informationItamar
We previously crashed when programs were missing certain debug information.
2020-05-23Kernel+LibC: Fix various build issues introduced by ssize_tAndreas Kling
Now that ssize_t is derived from size_t, we have to
2020-05-20Revert "Build: Include headers from LibC, LibM, and LibPthread with -isystem"Andreas Kling
This reverts commit c1eb744ff0a82cf6c8e3470ac10e2f417c7d9de2.
2020-05-20Build: Include headers from LibC, LibM, and LibPthread with -isystemAndrew Kaster
Make sure that userspace is always referencing "system" headers in a way that would build on target :). This means removing the explicit include_directories of Libraries/LibC in favor of having it export its headers as SYSTEM. Also remove a redundant include_directories of Libraries in the 'serenity build' part of the build script. It's already set at the top. This causes issues for the Kernel, and for crt0.o. These special cases are handled individually.
2020-05-14Build: Switch to CMake :^)Sergey Bugaev
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-09LibDebug: Add support for creating VariableInfo for paramtersItamar
2020-05-09HackStudio: Show a backtrace in the debug information tabItamar
2020-05-08HackStudio: Support variable inspection in nested scopesItamar
2020-05-07LibDebug: Miscellaneous fixes from #2097Itamar
2020-05-05LibDebug: Parse DWARF information entriesItamar
We can now iterate the tree structure of the DIEs, access attribute values and parse some very basic DWARF expressions.
2020-04-25LibDebug: Add remove_breakpointItamar
Also, change the interface of all breakpoint management functions to only take the address of the breakpoint as an argument.
2020-04-20Debugger: Add source-level operationsItamar
- Print current source location, if available - Add a breakpoint at a source location - "sl" command - step to the next line in source
2020-04-20LibDebug: Parse line number information from DWARF formatItamar
DWARF line number information, if generated, is stored in the .debug_line section of an object file. The information is encoded as instructions for a VM that is defined in the DWARF specification. By executing these instructions, we can extract the encoded line number information.
2020-04-16LibDebug: Add ContinueBreakAtSyscall decisionItamar
When the user of the DebugSession uses this decision, the debugged program will be continued until it is either stopped by a singal (e.g as a reuslt of a breakpoint), or enters a syscall.
2020-04-16Userland: Add "functrace" utilityItamar
functrace traces the function calls a program makes. It's like strace, but for userspace. It works by using Debugging functionality to insert breakpoints at call&ret instructions.