windows-x86-debugger
🐞 A simple Windows x86 debugging framework written in C++20 that supports software breakpoints and hardware breakpoints. It can be used to create custom debuggers.(使用C++20开发的简易Windows x86调试框架,支持软件断点和硬件断点,可以用于创建自定义调试器。)
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.1%) to scientific vocabulary
Keywords
Repository
🐞 A simple Windows x86 debugging framework written in C++20 that supports software breakpoints and hardware breakpoints. It can be used to create custom debuggers.(使用C++20开发的简易Windows x86调试框架,支持软件断点和硬件断点,可以用于创建自定义调试器。)
Basic Info
Statistics
- Stars: 12
- Watchers: 4
- Forks: 3
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Windows x86 Debugger
Introduction

A simple Windows x86 debugging framework written in C++20 that supports software breakpoints and hardware breakpoints. It can be used to create custom debuggers. Some design patterns came from GleeBug.
Getting Started
Prerequisites
- Install Visual Studio 2022.
- Install CMake.
- Set the
PATHenvironment variables.
Building
Set the location to the project folder and run:
bash
mkdir -p build
cd build
cmake .. -G "Visual Studio 17 2022" -A Win32
cmake --build .
Usage
Users can create derived classes inheriting from Debugger class and override or implement provided event callbacks.
Debuggerdoes not provide any implementation for event callbacks whose names start withcb.Debuggerprovides the basic implementation for event callbacks whose names start withOn.
```c++ class MyDebugger : public Debugger { private: void cbCreateProcess(const CREATEPROCESSDEBUG_INFO& details, const Process& process) override { std::cout << std::format("The process {} has been created.", process.Id()) << std::endl; }
void cbExitProcess(const EXIT_PROCESS_DEBUG_INFO& details,
const Process& process) override {
std::cout << std::format("The process {} has exited.",
process.Id())
<< std::endl;
}
}; ```
Documents
Code comments follow Doxygen specification.
Class Diagram
```mermaid classDiagram
namespace register {
class RegisterIndex {
<<enumeration>>
EAX
EBX
ECX
EDX
}
class Register {
Set(int)
Reset()
Get() int
}
class Flag {
<<enumeration>>
CF
AF
PF
ZF
}
class FlagRegister {
SetCF()
ResetCF()
CF() bool
}
class DebugStatusRegister {
SetB0()
ResetB0()
B0() bool
}
class DebugControlRegister {
SetL0()
ResetL0()
L0() bool
SetRW0(val)
RW0() int
}
class Registers {
Register EAX
FlagRegister EFLAGS
DebugStatusRegister DR6
DebugControlRegister DR7
}
}
Register --> RegisterIndex Register <|-- FlagRegister FlagRegister ..> Flag Register <|-- DebugStatusRegister Register <|-- DebugControlRegister Registers o-- Register
namespace breakpoint {
class Breakpoint {
int address
}
class HardwareBreakpointSlot {
<<enumeration>>
DR0
DR1
DR2
DR3
}
class HardwareBreakpointType {
<<enumeration>>
Execute
Write
ReadWrite
}
class HardwareBreakpointSize {
<<enumeration>>
Byte
Word
Dword
}
class HardwareBreakpoint {
HardwareBreakpointSlot slot
HardwareBreakpointType access
HardwareBreakpointSize size
}
class SoftwareBreakpoint {
byte origin
}
}
Breakpoint <|-- HardwareBreakpoint HardwareBreakpoint --> HardwareBreakpointSlot HardwareBreakpoint --> HardwareBreakpointType HardwareBreakpoint --> HardwareBreakpointSize Breakpoint <|-- SoftwareBreakpoint
class Thread { Suspend() Resume() StepInto() SetHardwareBreakpoint(addr, slot, type, size) DeleteHardwareBreakpoint(slot) }
Thread *-- HardwareBreakpoint Thread --> Registers
class Process { Suspend() Resume() FindThread(id) Thread NewThread(thread) RemoveThread(thread) SetSoftwareBreakpoint(addr, callback) DeleteSoftwareBreakpoint(addr) FindSoftwareBreakpoint(addr) SoftwareBreakpoint SetHardwareBreakpoint(addr, slot, type, size, callback) DeleteHardwareBreakpoint(addr) FindHardwareBreakpoint(addr) HardwareBreakpoint WriteMemory(addr, data) ReadMemory(addr, size) vector~byte~ }
Process *-- Thread Process *-- SoftwareBreakpoint
class Debugger { Create(file, cmd) Attach(proc) Start() Detach() Stop() }
Debugger o-- Process ```
License
Distributed under the MIT License. See LICENSE for more information.
Owner
- Name: Zhuagenborn
- Login: Zhuagenborn
- Kind: organization
- Location: Ireland
- Repositories: 3
- Profile: https://github.com/Zhuagenborn
Software Development | Artificial Intelligence | Reverse Engineering.
Citation (CITATION.cff)
cff-version: 1.2.0 authors: - family-names: Chen given-names: Zhenshuo orcid: https://orcid.org/0000-0003-2091-4160 - family-names: Liu given-names: Guowen orcid: https://orcid.org/0000-0002-8375-5729 title: Windows x86 Debugger date-released: 2022-11-05 url: https://github.com/Zhuagenborn/Windows-x86-Debugger
GitHub Events
Total
- Watch event: 1
- Push event: 2
Last Year
- Watch event: 1
- Push event: 2
Issues and Pull Requests
Last synced: 5 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0