How vekendian/stellar works
Stellar is a C++ ELF/DWARF dumper with both command-line and interactive front ends. Its main workflow opens an ELF, discovers and walks DWARF data (or uses the documented dwarfless path), builds an intermediate type model, then emits either a flat C#-style dump or a source-shaped tree. The graph also retains the TUI, disassembly, and progress/metrics capabilities. Some subsystem links are documented rather than visible in sampled implementation excerpts; those are identified by README evidence.
Main entry points: main.cpp CLI commands · build.cpp Model builder · analysis.cpp TUI analysis · emit_tree.cpp Source tree emitter
Components 19
User front ends
- CLI commands
src/app/main.cpp - Interactive TUI
src/tui/app.cpp - TUI analysis
src/tui/analysis.cpp
Binary and debug parsing
- ELF reader
src/elf/elf_file.cpp - Header recovery
src/elf/phdr_recovery.cpp - DWARF context
src/dwarf/dwarf_context.cpp - Unit and DIE reader
src/dwarf/unit.cpp - Line tables
src/dwarf/line.cpp - EH frame reader
src/dwarf/eh_frame.cpp - Disassembly
src/disasm/disasm.cpp
Model construction
- Model builder
src/ir/build.cpp - Intermediate model
src/ir/model.cpp
Dump output
- Flat C# emitter
src/output/emit_il2cpp.cpp - Source tree emitter
src/output/emit_tree.cpp - Type normalization
src/output/normalize.cpp - Function bodies
src/output/bodies.cpp
Runtime support
- Progress reporting
src/diag/progress.cpp - Run metrics
src/diag/metrics.cpp
Other components
- User
Connections 28
- User → CLI commands: runs commands
- User → Interactive TUI: launches
- CLI commands → ELF reader: opens input
src/app/main.cpp - ELF reader → Header recovery: recovers headers
src/elf/phdr_recovery.cpp - DWARF context → ELF reader: reads ELF view
- CLI commands → DWARF context: discovers units
src/app/main.cpp - DWARF context → Unit and DIE reader: walks units
- Model builder → DWARF context: reads debug context
- Model builder → EH frame reader: uses function ranges
- Model builder → Line tables: uses source lines
src/ir/build.cpp - CLI commands → Model builder: builds model
src/app/main.cpp - Model builder → Intermediate model: constructs
- CLI commands → Flat C# emitter: emits dump
src/app/main.cpp - Flat C# emitter → Intermediate model: reads model
- Flat C# emitter → Type normalization: normalizes types
src/output/emit_il2cpp.cpp - CLI commands → Source tree emitter: emits tree
src/app/main.cpp - Source tree emitter → Intermediate model: reads model
- Source tree emitter → Type normalization: normalizes types
src/output/emit_tree.cpp - Source tree emitter → Function bodies: uses optional bodies
- Function bodies → Disassembly: decodes instructions
- CLI commands → Function bodies: configures optional bodies
src/app/main.cpp - Interactive TUI → TUI analysis: starts analysis
- TUI analysis → ELF reader: opens binaries
src/tui/analysis.cpp - TUI analysis → Model builder: builds model
src/tui/analysis.cpp - TUI analysis → Flat C# emitter: requests flat output
src/tui/analysis.cpp - TUI analysis → Source tree emitter: requests tree output
src/tui/analysis.cpp - Model builder → Progress reporting: updates counters
src/ir/build.cpp - Progress reporting → Run metrics: reads counters
src/diag/progress.cpp