kcov
From Gentoo Wiki
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
Emerge
As of 2024-07-19 the package has no maintainer, the latest available version is 40, which has significant bugs. Therefore, it is better to install the mainline package (version > 42). The mainline package does not require patching on musl-based systems.
Mainline package
=dev-util/kcov-9999 **
root #
emerge --ask dev-util/kcov
Outdated package
root #
emerge --ask dev-util/kcov
To install the package on a musl-based system, the following patch needs to be applied:
--- 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>