跳到正文
cccskills
免费在 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.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Check if specific lines were executed using gcov data

查看安装方法

适用场景

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

包含的文件(2)

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

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

audit

免费

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/raptor39302026年10月20日 更新

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/raptor39302026年10月20日 更新

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/raptor39302026年10月20日 更新

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/raptor39302026年10月20日 更新

frida

免费

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/raptor39302026年10月20日 更新

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/raptor39302026年10月20日 更新

查看 gadievron 的全部技能

报告此技能的问题