How radare/radare2 works
Radare2 is a command-line reverse-engineering framework built around opening and inspecting binaries, then analyzing, searching, debugging, and optionally modifying them. The README describes the user workflow and major capabilities; the tree identifies the corresponding libraries and tools. The graph preserves the documented stages and notable subsystems, but source excerpts do not show most cross-library calls, so those relationships are omitted rather than inferred. The r2r runner is excluded as test infrastructure.
Main entry points: core Interactive core · radare2.c Radare2 CLI · io File and memory I/O · arch.c Architecture support
Components 19
Command-line experience
- Radare2 CLI
binr/radare2/radare2.c - Console input
libr/cons/dietline.c - Interactive core
libr/core
Binary access
- Binary inspection
binr/rabin2/rabin2.c - Binary formats
libr/bin/bin.c - File and memory I/O
libr/io - Filesystem plugins
libr/fs
Analysis and search
- Architecture support
libr/arch/arch.c - Disassembly and assembly
libr/asm/asm.c - Program analysis
libr/anal/fcn.c - Search commands
libr/core/cmd_search.inc.c - Search engine
libr/search/search.c - Flags and symbols
libr/flag/flag.c
Execution and scripting
- Debug sessions
libr/debug/dsession.c - Windows debugger
shlr/winkd/winkd.c - Embedded scripting
libr/lang
Extensions
- Plugin package manager
binr/r2pm/r2pm.c - Plugins
libr/anal/anplugs.c
Other components
- Engineer
Connections 18
- Engineer → Radare2 CLI: opens binary
- Radare2 CLI → Interactive core: starts session
- Interactive core → File and memory I/O: opens files
- Binary inspection → Binary formats: inspects formats
- Interactive core → Binary formats: loads binaries
- Interactive core → Program analysis: analyzes program
- Interactive core → Search commands: runs search commands
libr/core/cmd_search.inc.c - Search commands → Search engine: executes searches
- Interactive core → Debug sessions: debugs programs
- Debug sessions → Windows debugger: uses remote backend
- Interactive core → Embedded scripting: runs scripts
- Interactive core → File and memory I/O: modifies files
- Radare2 CLI → Console input: reads commands
- Interactive core → Architecture support: selects architecture
- Architecture support → Disassembly and assembly: decodes instructions
- Interactive core → Flags and symbols: uses symbols
- Plugin package manager → Plugins: extends capabilities
- File and memory I/O → Filesystem plugins: accesses filesystems