Skip to content
cccskills
FreePublished on GitHub

Line Execution Checker

Check whether specific source lines ran during tests using gcov coverage data, which records code execution. Inspect one or several lines and report execution counts, with exit codes distinguishing uncovered lines from errors.

OriginalShow the original description

Check if specific lines were executed using gcov data

See how to install

Good for

  • Checking whether a specific line ran during tests
  • Inspecting execution counts for several lines
  • Identifying lines left unexecuted by tests

Files included (2)

  • SKILL.md1.9 KB
  • line_checker.cpp7.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Line Execution Checker

Purpose

Fast tool to check if specific source lines were executed during test runs.

Tool: line-checker

Build

Always build fresh from this skill's line_checker.cpp, into a scratch directory YOU create — never into (or from) the coverage/build directory. That directory is written by the instrumented target's own build and run, so any pre-existing line-checker found there could have been planted by the analysed program to forge coverage verdicts; never execute one.

CHECKER_DIR=$(mktemp -d)
g++ -O3 -std=c++17 line_checker.cpp -o "$CHECKER_DIR/line-checker"

Usage

# Single line (from the coverage data directory)
"$CHECKER_DIR/line-checker" file.c:42

# Multiple lines
"$CHECKER_DIR/line-checker" file.c:42 main.c:100 util.c:55

Output

file.c:42 EXECUTED (5 times)
main.c:100 NOT EXECUTED
util.c:55 EXECUTED (12 times)

Exit Codes

  • 0: All lines executed
  • 1: One or more lines NOT executed
  • 2: Error

Prerequisites

Coverage data must exist from prior test run with --coverage flag.

When User Asks

"Was line X of file.c executed?" or "Check if these lines were covered"

Steps

  1. Verify .gcda files exist: find . -name "*.gcda" -print -quit
  2. Build the tool fresh into a scratch dir (see Build above — never reuse a line-checker binary found in the coverage/build tree): CHECKER_DIR=$(mktemp -d) && g++ -O3 -std=c++17 line_checker.cpp -o "$CHECKER_DIR/line-checker"
  3. Run: "$CHECKER_DIR/line-checker" file.c:X
  4. Report result to user

Example Interaction

User: "Was line 127 in parser.c executed?"

"$CHECKER_DIR/line-checker" parser.c:127
# Output: parser.c:127 EXECUTED (3 times)

Response: "Yes, line 127 was executed 3 times during testing."

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

audit

FreeSummary

Review code that has not yet been checked by forming security hypotheses and testing them with analysis tools. The skill records evidence, checks whether affected code is reachable, searches for related patterns, and preserves review progress across sessions.

  • Reviewing code that has not yet received security checks
  • Testing suspected vulnerabilities with analysis tools
  • Searching the codebase for patterns behind confirmed findings
gadievron/raptor3.9KUpdated Oct 20, 2026

Add gcov coverage measurement to C/C++ projects and see which lines, branches, and functions tests execute. The skill covers Makefile and CMake settings, test execution, and text or HTML reports that help identify untested code.

  • Adding coverage measurement to a C/C++ project
  • Finding lines and branches tests do not execute
  • Adding optional coverage settings to Makefile or CMake
gadievron/raptor3.9KUpdated Oct 20, 2026

Understand how unfamiliar code works from a security perspective. The skill maps architecture, follows untrusted input through the code, and searches for similar vulnerability patterns, with file and line references to support static analysis and finding validation.

  • Mapping unfamiliar code before security scanning
  • Tracing untrusted input to dangerous operations
  • Searching for variants of a known vulnerability
gadievron/raptor3.9KUpdated Oct 20, 2026

Validate vulnerability findings by checking code, reachable attack paths, observable test results, and realistic prerequisites. The workflow produces evidence-backed reports and assesses binary constraints for memory corruption issues before exploit development proceeds.

  • Verify vulnerability scanner findings
  • Identify unreachable code and unrealistic prerequisites
  • Assess exploitation constraints for memory corruption
gadievron/raptor3.9KUpdated Oct 20, 2026

frida

FreeSummary

Observe running apps and binaries with Frida, a tool for inspecting programs during execution. Capture API calls, function activity, and script events in organized run folders across local, USB-connected, or remote targets.

  • Confirming whether a flagged dangerous function runs
  • Tracing API calls in an unfamiliar app
  • Investigating mobile traffic blocked by SSL pinning
gadievron/raptor3.9KUpdated Oct 20, 2026

Record function entry and exit in C/C++ programs, with separate logs for each thread. Convert those logs into a Perfetto timeline to inspect call depth, execution order, and activity across threads.

  • Following function execution order
  • Inspecting call depth in logs
  • Viewing multiple threads on one timeline
gadievron/raptor3.9KUpdated Oct 20, 2026

See all skills by gadievron

Report a problem with this skill