本文へ移動
cccskills
無料GitHub で公開

Line Execution Checker

Check if specific lines were executed using gcov data

インストール方法を見る

含まれるファイル(2)

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

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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."

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

audit

無料

Hypothesis-driven, tool-grounded security review of coverage gaps

日本語の概要は準備中です。原文の説明を表示しています。

gadievron/raptor3,8992026年10月13日 更新

Add gcov code coverage instrumentation to C/C++ projects

日本語の概要は準備中です。原文の説明を表示しています。

gadievron/raptor3,8992026年10月13日 更新

Provides adversarial code comprehension for security research, mapping architecture, tracing data flows, and hunting vulnerability variants to build ground-truth understanding before or alongside static analysis.

日本語の概要は準備中です。原文の説明を表示しています。

gadievron/raptor3,8992026年10月13日 更新

Multi-stage pipeline for validating that vulnerability findings are real, reachable, and exploitable, preventing wasted effort on hallucinated findings, dead code paths, or findings with unrealistic preconditions.

日本語の概要は準備中です。原文の説明を表示しています。

gadievron/raptor3,8992026年10月13日 更新

frida

無料

Dynamic instrumentation via Frida - attach to or spawn a process, load a JS hook script, capture send() events into a lifecycle-managed run directory. Supports local, USB-attached, and remote frida-server targets.

日本語の概要は準備中です。原文の説明を表示しています。

gadievron/raptor3,8992026年10月13日 更新

Instrument C/C++ with -finstrument-functions for execution tracing and Perfetto visualisation

日本語の概要は準備中です。原文の説明を表示しています。

gadievron/raptor3,8992026年10月13日 更新

gadievron のスキルをすべて見る

このスキルの問題を報告する