Note
This is KDebugger. A Linux Debugger and it is very much still under development once finished, I should have some more time to create the surrounding tool chain of the "K" tools :)
Important
This is a strictly Linux Based Debugger (for now) and complies with the POSIX standards. If you're not running linux and intend to test this on windows - I will eventually come to make a port :)
A Linux Debugger, Profiler and Disassembler built with C++ for extendable testing and feature-rich debugging; As it stands currently; this project only features a LLDB/GDB inspired debugger would use. Cnce complete, I'll move on to including a profiler:
- unit-testing automation,
- disssssembler,
- flamegraph support
- and... Possibly a unique, new build system
This was something I have wanted to do for a while - and all the better
with my love for C++. This project urrently uses C++17 however
I'm looking to (after completion) incorperate newer C++20 and 23 features
like coroutines etc... that may help utilize a more modern, asynchronous
architecture.
This project features a debugger tool that I personally use on my Linux
Fedora build for development. Following this, there is still a lot of room
for improvement... and a lot of other new features I am looking to add! Once I
start building out the multi-threading architecture for process' it should
be more apparent why this project, would be a great choice to put in your
toolchain. Experiment and have fun! all the feedback is appreciated!
I've always wanted to built a debugger and the tools surrounding it. This along with my eventual, dissassembler and profiler will hopefully make its way into a suite of tools I can use personally.
Really, this is just about getting better with C++ - I aim to improve
and learn new things everyday and granted, this is definitely the project
for such a task. At the moment, It will remain in C++17, when I find time
to convert functions and make them asynchronously and add coroutines, mabye
some concepts and meta-template programming - these will be in the separate
given branches for people to see how these conversions work
KDebugger/
├── .github/
│ └── workflows/
│ └── cmake-single-platform.yml
├── build/
│ ├── Makefile
│ └── README.md
├── include/
│ └── libkdebugger/
│ ├── detail/
│ │ └── registers.inc
│ ├── bit.hpp
│ ├── breakpoint_site.hpp
│ ├── breakpoint.hpp
│ ├── disassembler.hpp
│ ├── dwarf.hpp
│ ├── elf.hpp
│ ├── error.hpp
│ ├── libkdebugger.hpp
│ ├── parse.hpp
│ ├── pipe.hpp
│ ├── process.hpp
│ ├── register_info.hpp
│ ├── registers.hpp
│ ├── stack.hpp
│ ├── stoppoint_collection.hpp
│ ├── syscalls.hpp
│ ├── target.hpp
│ ├── types.hpp
│ └── watchpoint.hpp
├── src/
│ ├── include/
│ │ └── syscalls.inc
│ ├── breakpoint_site.cpp
│ ├── breakpoint.cpp
│ ├── CMakeLists.txt
│ ├── disassembler.cpp
│ ├── dwarf.cpp
│ ├── elf.cpp
│ ├── libkdebugger.cpp
│ ├── pipe.cpp
│ ├── process.cpp
│ ├── registers.cpp
│ ├── stack.cpp
│ ├── syscalls.cpp
│ ├── target.cpp
│ ├── types.cpp
│ └── watchpoint.cpp
├── test/
│ ├── targets/
│ │ ├── anti_debugger.cpp
│ │ ├── CMakeLists.txt
│ │ ├── end_immediately.cpp
│ │ ├── hello_kdebugger.cpp
│ │ ├── libmarshmellow.cpp
│ │ ├── main_cu_main.cpp
│ │ ├── marshmellow.cpp
│ │ ├── memory.cpp
│ │ ├── multi_cu_other.cpp
│ │ ├── multithreaded.cpp
│ │ ├── overloaded.cpp
│ │ ├── reg_read.s
│ │ ├── reg_write.s
│ │ ├── run_endlessly.cpp
│ │ └── step.cpp
│ ├── CMakeLists.txt
│ └── tests.cpp
├── tools/
│ ├── CMakeLists.txt
│ └── kdebugger.cpp
├── .clang-format
├── .clang-tidy
├── .gitignore
├── CMakeLists.txt
├── LICENSE
├── README.md
└── vcpkg.json
Note
Features with
- A Basice Debugger Capable of interacting with Process ✅
- Provides User with Memory Address Locations and single-stepping ✅
- Disassembling Code to x64 ASM and allows stepping and memory modification ✅
- Software and Hardware Breakpoint functionality ✅
- Extended Watchpoint and Catchpoint functionality around Systemcalls ✅
- Signal and Error handling based on unit testing (via Catch2) ✅
- Multi-Threaded Architecture ✅
- In-Depth Debug Information and Improvement statistics ✅
- Line Tables and Source-Level breakpoints ✅
- Stack Frame & Unwinding unique view ✅
- Internal library observation ✅
- Linking and Encoding information ✅
- Profiler and Code-Generation Optimization Techniques
⚠️ - Custom Disassembler and Profiler Integration (Big Goal)
⚠️ - Flame Graph Support and Logging
⚠️
KDebugger> help
- memory
- disassemble
- breakpoint
- watchpoint
- catchpoint
- step
- continue
- more to come...
This project takes advantage of CMake 3.29 and is used in accompany with VCPKG Catch2 and Libedit. Catch2 and Libedit are dependencies you'll need to install via your package manager. VCPKG takes care of including these dependencies in our project tree structure, to build:
cd build && cmake ..
In case VCPKG, encounters errors - boostrap it and run this in build.
cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/your/vcpkg/scripts/buildsystems/vcpkg.cmake
make
This project is licensed under the GPL License.