Add Function-Level Coverage Overview and Statistics
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 331
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
Feature Request
Add a function-level coverage overview widget that provides aggregate statistics and analysis capabilities beyond the current instruction-level painting.
Current Limitations
Currently, the debugger only paints coverage at the instruction level in the disassembly view. While useful, this makes it difficult to:
- Identify which functions have the most/least coverage
- Get an overall coverage percentage
- Prioritize which uncovered code to analyze
- Export coverage statistics for reporting
- Compare coverage across different functions
Proposed Feature
Add a "Coverage Overview" widget with a sortable table displaying:
Columns
- Function Name - Demangled name with address
- Blocks Executed - e.g., "15/23" (executed/total)
- Instructions Executed - e.g., "87/145"
- Coverage % - Calculated from instructions executed
- Execution Count - Total times instructions in this function executed
- Complexity (optional) - Cyclomatic complexity if available
Capabilities
- Sort by any column (find least covered, most complex, etc.)
- Search/filter by function name
- Double-click to navigate to function
- Export to CSV/JSON
- Color-coded rows based on coverage percentage
- Show aggregate statistics (overall coverage %, total functions covered, etc.)
Benefits
- Quick Assessment - Immediately see which functions need attention
- Prioritization - Focus testing on high-complexity low-coverage functions
- Reporting - Export coverage metrics for documentation/reports
- Comparison - When combined with #987, compare coverage across multiple traces
- Fuzzing Integration - Identify gaps in fuzzer-generated coverage
Implementation Notes
- Leverage Binary Ninja's existing function/basic block APIs
- Aggregate data from existing
m_executedInstructionCountsmap - UI should update when coverage is loaded/changed
- Consider async computation for large binaries
Related Issues
- Depends on #987 for proper architecture (coverage provider/consumer separation)
- Enables coverage composition features mentioned in #987
Example UI (from similar tools)
Function-level coverage tables are a standard feature in coverage tools like:
- Lighthouse (IDA/Binary Ninja coverage plugin)
- Bullseye Coverage
- gcov/lcov
The table would integrate naturally with Binary Ninja's dockable widget system.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing Binary Ninja's existing function/basic block APIs and the m_executedInstructionCounts map. Then examine the dockable widget system and issue #987's proposed coverage provider/consumer architecture. Done means a sortable, filterable function-level coverage widget with aggregate statistics that updates when coverage changes and supports the requested navigation and export capabilities.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, reverse-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100