kcov

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.

kcov is a code coverage tool.

Installation

USE flags

USE flags for dev-util/kcov Kcov is a code coverage tester for compiled languages, Python and Bash

binutils Use sys-libs/binutils-libs for --verify support

Emerge

root #emerge --ask dev-util/kcov

To install the package on a musl-based system, the following patch needs to be applied:

FILE /etc/portage/patches/dev-util/kcov-40/ptrace.patch
--- a/src/engines/ptrace_linux.cc
+++ b/src/engines/ptrace_linux.cc
@@ -8,6 +8,8 @@
 #  include <elf.h>
 #endif

+typedef int __ptrace_request;
+
 #include <dirent.h>
 #include <sched.h>
 #include <stdio.h>

As of 2024-07-01, the above patch is also required to compile the mainline branch.