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' --- executor/common_linux.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'executor/common_linux.h') diff --git a/executor/common_linux.h b/executor/common_linux.h index 02c1eb82e..e8ac309c3 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -13,6 +13,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