diff options
author | van Hauser <vh@thc.org> | 2019-08-01 12:01:04 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2019-08-01 12:01:04 +0200 |
commit | 3e418ecb6ee6a850eadd77b71b6d5fc2372abdc1 (patch) | |
tree | d2fcaa529360e16d8b4fe1d05f451e25fb801147 /afl-showmap.c | |
parent | 89769c836f6ce8f33fd7837e0df24fc591f18353 (diff) | |
download | afl++-3e418ecb6ee6a850eadd77b71b6d5fc2372abdc1.tar.gz |
showmap shows tuple content summary now
Diffstat (limited to 'afl-showmap.c')
-rw-r--r-- | afl-showmap.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/afl-showmap.c b/afl-showmap.c index 4bbc42ee..56e37f81 100644 --- a/afl-showmap.c +++ b/afl-showmap.c @@ -59,6 +59,8 @@ static u8 *out_file, /* Trace output file */ static u32 exec_tmout; /* Exec timeout (ms) */ +static u32 total, highest; /* tuple content information */ + static u64 mem_limit = MEM_LIMIT; /* Memory limit (MB) */ static u8 quiet_mode, /* Hide non-essential messages? */ @@ -155,7 +157,6 @@ static u32 write_results(void) { } - if (binary_mode) { for (i = 0; i < MAP_SIZE; i++) @@ -174,6 +175,10 @@ static u32 write_results(void) { if (!trace_bits[i]) continue; ret++; + + total += trace_bits[i]; + if (highest < trace_bits[i]) + highest = trace_bits[i]; if (cmin_mode) { @@ -543,7 +548,7 @@ int main(int argc, char** argv) { s32 opt; u8 mem_limit_given = 0, timeout_given = 0, qemu_mode = 0, unicorn_mode = 0; - u32 tcnt; + u32 tcnt = 0; char** use_argv; doc_path = access(DOC_PATH, F_OK) ? "docs" : DOC_PATH; @@ -701,7 +706,7 @@ int main(int argc, char** argv) { if (!quiet_mode) { if (!tcnt) FATAL("No instrumentation detected" cRST); - OKF("Captured %u tuples in '%s'." cRST, tcnt, out_file); + OKF("Captured %u tuples (highest value %u, total values %u) in '%s'." cRST, tcnt, highest, total, out_file); } |