From 5f78ab4b8149c28d68103911a7fc22a9ee79d811 Mon Sep 17 00:00:00 2001 From: Anton Lindqvist Date: Thu, 20 Sep 2018 11:17:14 +0200 Subject: executor: move debug_dump_data() into common_linux.h Compiling the executor on OpenBSD currently fails: executor/executor.cc:1316:6: error: unused function 'debug_dump_data' --- pkg/csource/generated.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pkg/csource/generated.go') diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index fd6bcc862..8225423fd 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -682,6 +682,18 @@ struct cover_t; static void cover_reset(cover_t* cov); #endif +static void debug_dump_data(const char* data, int length) +{ + if (!flag_debug) + return; + for (int i = 0; i < length; i++) { + debug("%02x ", data[i] & 0xff); + if (i % 16 == 15) + debug("\n"); + } + debug("\n"); +} + #if SYZ_EXECUTOR || SYZ_THREADED #include #include -- cgit mrf-deployment