Skip to content

gdb

The community/apps/gdb directory contains files that enable voice control for the GNU Debugger (GDB). The files work together to provide a comprehensive set of commands that allow a user to interact with GDB using their voice.

  • gdb_active.talon defines the core voice commands for interacting with GDB. This file uses the user.gdb tag, which is enabled and disabled by gdb_global.talon. It defines commands for common debugging actions like setting breakpoints (break [on] clipboard), inspecting variables (print [variable] <user.text>), stepping through code (until <number>), and controlling program execution (continue). It also includes commands for displaying information about the program state, such as registers, threads, and disassembly. The file also includes some specialized commands like hex dumping (hex dump <number> bytes) and commands for showing and setting GDB settings.

  • gdb.py defines a module with actions and contexts that are used in the Talon files. It defines the user.gdb tag and actions to enable and disable it. It also defines a number of actions on the user namespace that are used in gdb_active.talon, such as the debugger commands debugger_step_into(), debugger_step_over(), debugger_continue(), debugger_add_sw_breakpoint(), and more. These actions are responsible for inserting the corresponding GDB commands into the terminal.

  • gdb_global.talon provides commands to toggle the user.gdb tag, enabling and disabling the GDB-specific voice commands defined in gdb_active.talon. This file contains two commands, "enable debug mode" which calls user.gdb_enable() and "disable debug mode" which calls user.gdb_disable().