aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@basename.se>2018-12-27 15:33:18 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-12-28 08:25:37 +0100
commitfc6ae81a344440b24e74577076581b6919ba49ad (patch)
tree05720ff819a95b7e6cf31504c78ae82684c15d56 /executor
parentaf3175049a06f26750711b554a8fbd69527efca7 (diff)
executor: KIOENABLE accepts a mode argument on OpenBSD
Diffstat (limited to 'executor')
-rw-r--r--executor/executor_bsd.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/executor/executor_bsd.h b/executor/executor_bsd.h
index 9795dd198..290ddce2b 100644
--- a/executor/executor_bsd.h
+++ b/executor/executor_bsd.h
@@ -52,6 +52,9 @@ static long execute_syscall(const call_t* c, long a[kMaxArgs])
#elif GOOS_openbsd
+// TODO(mptre): temporary defined until trace-cmp is fully supported
+#define KCOV_MODE_TRACE_CMP 2
+
#include <sys/kcov.h>
#endif
@@ -88,14 +91,9 @@ static void cover_open(cover_t* cov)
static void cover_enable(cover_t* cov, bool collect_comps)
{
-#if GOOS_freebsd
int kcov_mode = flag_collect_comps ? KCOV_MODE_TRACE_CMP : KCOV_MODE_TRACE_PC;
if (ioctl(cov->fd, KIOENABLE, &kcov_mode))
exitf("cover enable write trace failed, mode=%d", kcov_mode);
-#elif GOOS_openbsd
- if (ioctl(cov->fd, KIOENABLE))
- exitf("cover enable write trace failed");
-#endif
}
static void cover_reset(cover_t* cov)