Main Interface Components
Ghidra’s CodeBrowser provides a comprehensive reverse engineering environment with multiple coordinated views and tools.The CodeBrowser is implemented by the
CodeBrowserPlugin which serves as the primary program listing display window and coordinates with other plugins.Primary Windows
- Code Browser
- Decompiler
- Symbol Tree
- Data Type Manager
The central listing view displays disassembled code, data, and program information:
- Listing Panel: Main program view with configurable fields
- Header Component: Allows rearrangement of program fields
- Field Panel: Displays addresses, bytes, mnemonics, operands, and comments
- Navigation Controls: Cursor movement and selection tools
Workspace Layout
Ghidra uses a docking window system that allows customization of the interface layout.1
Default Layout
By default, Ghidra opens with:
- Code Browser (center)
- Symbol Tree (left panel)
- Decompiler (right panel)
- Function Window (bottom)
2
Customize Layout
Drag window tabs to reposition views:
- Dock panels to any edge
- Create tabbed groups
- Float windows as separate dialogs
- Save layouts for different workflows
3
Window Management
Access windows via the
Window menu:- Toggle visibility of any component
- Reset to default layout
- Create snapshots of connected or disconnected providers
Navigation Features
Location Tracking
The CodeBrowser tracks your current location and generates events:- ProgramLocation: Current cursor position in the program
- ProgramSelection: Selected address ranges
- ProgramHighlight: Highlighted regions for emphasis
Navigation Actions
1
Go To Address
Press
G to open the Go To dialog:- Enter addresses in hexadecimal
- Navigate to labels by name
- Jump to file offsets
2
Follow References
Double-click or press
Enter on:- Function calls to jump to function definition
- Data references to navigate to data
- Cross-references to explore relationships
3
Return Navigation
Use navigation history:
Alt + Left Arrow: Go backAlt + Right Arrow: Go forward- Maintains full navigation trail
Context Actions
Right-click context menus provide location-specific actions based on:- Current cursor position
- Selection type (code, data, or undefined)
- Available context providers
Action Contexts
Ghidra uses specialized action contexts:ListingActionContext: Actions in the listing viewProgramActionContext: Program-wide actionsNavigatableActionContext: Navigation-specific actionsCodeViewerActionContext: Code viewer operations
Service Architecture
The CodeBrowser provides services to other plugins: Services Provided:CodeViewerService: Extends basic listing functionalityCodeFormatService: Manages field formattingFieldMouseHandlerService: Handles mouse interactions
ProgramManager: Program lifecycle managementGoToService: Navigation operationsClipboardService: Copy/paste functionality
Field Configuration
Customize the listing display fields:1
Access Field Manager
Right-click on the field header or use
Edit > Tool Options > Listing Fields2
Configure Fields
- Add or remove fields
- Reorder field display
- Adjust field widths
- Configure field-specific options
3
Save Configuration
Field configurations are saved with:
- Tool configuration (persists across sessions)
- Individual program analysis settings
Event System
Ghidra plugins communicate via events: Events Consumed:ProgramActivatedPluginEvent: Program becomes activeProgramClosedPluginEvent: Program is closedProgramLocationPluginEvent: Location changesProgramSelectionPluginEvent: Selection changesProgramHighlightPluginEvent: Highlight changesViewChangedPluginEvent: View configuration changes
ProgramLocationPluginEvent: Broadcasts location to other pluginsProgramSelectionPluginEvent: Broadcasts selection to other plugins
