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
root #
emerge --ask dev-util/kcov
Versions below 42 require the following patch to be applied on musl-based systems:
--- 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>