How unknownworlds/decoda works
Main Components
a. Frontend (User Interface Layer)
• Located in the “src/Frontend” directory.
• Implements the graphical user interface (e.g., MainFrame, dialogs for breakpoints, project explorer, file change watchers, settings panels, etc.).
• Built using wxWidgets and wxScintilla for the code editor component.
b. Debug / Injection Module (Debugger Core)
• Found in “src/LuaInject”.
• Responsible for injecting debugging hooks (via Lua injection) into the target process and interfacing with the debug backend.
• Handles low-level operations like hooking functions, managing debug events, and communicating with the rest of the system.
c. Shared Utilities
• Located in “src/Shared”.
• Contains common modules such as Channels, CriticalSection objects, synchronization primitives, and protocol definitions.
• Acts as the foundation for communication between components and for shared low-level functionality.
d. External Libraries and Dependencies
• Third-party libraries included in the “libs” directory:
– wxWidgets and wxScintilla: Provide the UI and code editor support.
– LuaPlus: Facilitates Lua language integration.
– tinyxml: Likely used for configuration or project file parsing.
– dbghelp: Helps with debugging related tasks.
Architectural Patterns and Design Principles
• Modularity: Clearly show how the system is partitioned into independent modules that interact via well-defined interfaces.
• Separation of Concerns: Separate UI (Frontend) from Debugging internals (LuaInject) and from common services (Shared).
• Dependency Injection / Layering: Indicate that the Shared utilities provide services to both the UI and Debug components. External libraries are “plugged” into their respective layers.