about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--afl-showmap.c11
-rw-r--r--docs/ChangeLog3
2 files changed, 10 insertions, 4 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);
 
   }
 
diff --git a/docs/ChangeLog b/docs/ChangeLog
index 688c1a55..5e00af7c 100644
--- a/docs/ChangeLog
+++ b/docs/ChangeLog
@@ -17,7 +17,8 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
 Version ++2.53d (dev):
 ----------------------
 
-  - afl-showmap -o output now shows the real values in the buckets (stock afl never did)
+  - afl-showmap -o output now shows the real values in the buckets (stock afl
+    never did), plus shows tuple content summary information now
   - fix building on *BSD (thanks to tobias.kortkamp for the patch)
   - small docu updates
   - ... your patch? :)