Debugger Bots: Workflow Automation

Bots are a pluggable part of the Debugger's Workflow plugin and provide useful automation, taking actions on the user's behalf that would otherwise be tedious, or that should occur "under the hood." Each can be toggled from the Edit → Tool Options menu in Ghidra's Project window.

Show Interpreter

This bot automatically displays the interpreter console for new debugger connections. If a connection does not present an interpreter, then this bot will take no action. This action can be performed manually using the Console action in the Commands and Objects window.

Disassemble at Program Counter

This bot automatically disassembles trace memory, starting at the program counter. It is activated whenever an open trace's memory or program counters change. If the target presents a stack, then the bot will prefer to use the program counter recorded in the innermost frame 0. Otherwise, it will use the value of the program counter register. To accommodate multi-threaded traces, the bot considers all threads when responding to memory changes. It considers only the affected thread for program counter changes. This action can be performed manually using the Disassemble command in the Dynamic Listing window.

Map Modules

This bot automatically maps trace modules to programs opened in the same tool. It is activated whenever a trace or program is opened, or when an opened trace's modules change. For a given trace, this bot considers only those modules not already mapped, seeking suitable programs open in the same tool. If the trace is open in multiple tools (not common) the bot will consider programs from all such tools where the workflow plugin is enabled. This action can be performed manually using the Map Modules action in the Modules and Sections window.

Map Sections

This bot automatically maps trace sections to memory blocks of programs opened in the same tool. Its operation is analogous to that of the Map Modules Bot, except that it creates the mapped ranges by section. It is not commonly used, as it's less efficient than the Map Modules Bot, but it is required whenever a target presents sections which can be relocated independently of other sections in the same module. This is more common in abstract machines, such as the Java Virtual Machine, where each method is a "section." This action can be performed manually using the Map Sections action in the Modules and Sections window.