diff options
| author | Anton Lindqvist <anton@basename.se> | 2018-09-20 11:17:14 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-09-20 11:17:14 +0200 |
| commit | 5f78ab4b8149c28d68103911a7fc22a9ee79d811 (patch) | |
| tree | 68cac5ab27d7a1a3a38f68b6119462a4241fb11c /executor/common_linux.h | |
| parent | 25ff1e17d367ded0970d69c3dfdf023302d6ef23 (diff) | |
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'
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 <linux/futex.h> #include <pthread.h> |
