debugger
This directory defines a standardized, abstract interface for controlling debuggers via voice commands. By establishing a generic API for debugger interactions, it allows users to use the same voice commands regardless of the specific underlying debugger (e.g., GDB, LLDB, WinDbg, or Visual Studio).
How It Works
The directory relies on Talon's tag-and-action architecture. It is split into two primary components:
- The Interface Definition (debugger.py): Declares a generic
debuggertag and defines a wide list of empty fallback actions. It also registers a map of architecture registers, assigning phonetic names to standard CPU registers (e.g., mapping"air"torax/eax,"bat"torbx/ebx, and"cap"torcx/ecx). - The Voice Syntax (debugger.talon): Defines the voice commands that map natural language utterances to the abstract debugger actions. These commands are only active when the
user.debuggertag is enabled.
To use this system, a concrete debugger implementation (for example, a GDB integration module elsewhere in the repository) must activate the user.debugger tag and override the empty actions defined here with actual tool-specific keystrokes or CLI commands.
Core Components
debugger.py
This file sets up the data structures and actions needed to support debugging controls.
- Tag Definition: Registers the
debuggertag, which other modules can activate when a debugger window or terminal is focused. - Register Mappings: Contains architectural definitions for
x86_registersandx64_registers. This maps standard registers to pronounceable Talon vocabulary words (such as "drum" forrdxor "source" forrsi). - Abstract Action Declarations: Declares the Python functions that make up the debugger API. These include:
- Execution Control:
debugger_step_into(),debugger_step_over(),debugger_step_out(),debugger_continue(), etc. - Breakpoint Management:
debugger_add_sw_breakpoint(),debugger_clear_breakpoint_id(),debugger_disable_all_breakpoints(), etc. - State Inspection:
debugger_show_registers(),debugger_backtrace(),debugger_list_modules(). - Memory & Disassembly:
debugger_disassemble_here(),debugger_dump_ascii_string(),debugger_goto_address().
- Execution Control:
debugger.talon
This file defines the spoken commands. Since it requires the user.debugger tag to be active, these commands will not conflict with general-purpose voice operations when you are not debugging.
Key command groups include:
- Instruction & Line-Level Stepping: Standardized debugging controls like
"step into","step over line", and"continue". - Multi-Word Safety Commands: Critical actions like stopping or detaching the debugger are prefixed to prevent accidental triggers (e.g.,
"debug start","debug stop", and"debug detach"). - Breakpoint Controls: Highly customizable commands for adding, enabling, disabling, and clearing breakpoints, supporting target breakpoint numbers (e.g.,
"disable break <number_small>"). - Memory & Navigation: Quick controls for looking up memory addresses, dumping Unicode/ASCII strings, or jumping to locations stored in the clipboard (e.g.,
"jump to clipboard","disassemble here").