Skip to content

Latest commit

 

History

History
93 lines (52 loc) · 4.92 KB

File metadata and controls

93 lines (52 loc) · 4.92 KB
graph LR
    CLI_Entry_Point["CLI Entry Point"]
    Interactive_Session_Manager["Interactive Session Manager"]
    REPL_Core["REPL Core"]
    Command_Executor["Command Executor"]
    Command_Dispatcher["Command Dispatcher"]
    Command_Registration["Command Registration"]
    Built_in_Commands["Built-in Commands"]
    CLI_Entry_Point -- "initiates" --> Interactive_Session_Manager
    Interactive_Session_Manager -- "delegates to" --> REPL_Core
    REPL_Core -- "passes input to" --> Command_Executor
    Command_Executor -- "dispatches to" --> Command_Dispatcher
    Command_Dispatcher -- "receives registered commands from" --> Command_Registration
    Command_Dispatcher -- "invokes" --> Built_in_Commands
    Command_Registration -- "registers new commands with" --> Command_Dispatcher
Loading

CodeBoardingDemoContact

Details

The Command-Line Interface (CLI) & Shell subsystem of drgn provides the primary user-facing interface for interactive debugging and command execution. It serves as the main entry point for users to interact with the drgn debugger.

CLI Entry Point

Initializes the drgn environment, loads necessary debugging symbols, and orchestrates the start of the interactive debugging session. It acts as the initial bootstrap for the entire CLI experience.

Related Classes/Methods:

Interactive Session Manager

Manages the overall interactive debugging session lifecycle. This includes setting up the console, handling high-level session parameters (e.g., pager setup), and delegating to the REPL for user interaction.

Related Classes/Methods:

REPL Core

Provides the fundamental Read-Eval-Print Loop (REPL) functionality. It handles reading user input from the console, managing the interactive prompt, and passing the input for execution.

Related Classes/Methods:

Command Executor

Takes the raw source code or commands entered by the user in the REPL, performs initial parsing, and dispatches them for execution. It also handles basic error reporting for execution failures.

Related Classes/Methods:

Command Dispatcher

Acts as the central router for all commands. It determines whether the input corresponds to a registered drgn command or a standard shell command, and then invokes the appropriate handler. This component is crucial for the "Interpreter Pattern."

Related Classes/Methods:

Command Registration

Provides the mechanism for extending the drgn CLI by allowing Python functions to be registered as discoverable drgn commands. It often handles argument parsing setup for these commands, embodying the "Extensible/Plugin Architecture."

Related Classes/Methods:

Built-in Commands

Implement the specific logic and functionality for various debugging commands provided out-of-the-box by drgn. This includes commands for crash analysis, expression evaluation, and help.

Related Classes/Methods: