about summary refs log tree commit diff
path: root/qemu_mode/patches/afl-qemu-common.h
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2019-09-12 12:34:53 +0200
committerAndrea Fioraldi <andreafioraldi@gmail.com>2019-09-12 12:34:53 +0200
commit6b40189045645938098772260ecda1c0bcbf6467 (patch)
tree4e4c012155e4c7f78b4b9d93553f419bf9736fcc /qemu_mode/patches/afl-qemu-common.h
parentdf379dfcf46941125bc6b8f9d3e2e1141b84e137 (diff)
downloadafl++-6b40189045645938098772260ecda1c0bcbf6467.tar.gz
first version of persistent QEMU
Diffstat (limited to 'qemu_mode/patches/afl-qemu-common.h')
-rw-r--r--qemu_mode/patches/afl-qemu-common.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/qemu_mode/patches/afl-qemu-common.h b/qemu_mode/patches/afl-qemu-common.h
index 88c110b4..f05dc05b 100644
--- a/qemu_mode/patches/afl-qemu-common.h
+++ b/qemu_mode/patches/afl-qemu-common.h
@@ -47,3 +47,24 @@
 #define INC_AFL_AREA(loc) afl_area_ptr[loc]++
 #endif
 
+/* Declared in afl-qemu-cpu-inl.h */
+
+extern unsigned char *afl_area_ptr;
+extern unsigned int   afl_inst_rms;
+extern abi_ulong      afl_start_code, afl_end_code;
+extern abi_ulong      afl_persistent_addr;
+extern abi_ulong      afl_persistent_ret_addr;
+extern u8             afl_compcov_level;
+extern unsigned char  afl_fork_child;
+extern unsigned char  is_persistent;
+
+extern __thread abi_ulong afl_prev_loc;
+
+void afl_persistent_loop();
+
+void tcg_gen_afl_call0(void *func);
+void tcg_gen_afl_compcov_log_call(void *func, target_ulong cur_loc,
+                                  TCGv_i64 arg1, TCGv_i64 arg2);
+
+void tcg_gen_afl_maybe_log_call(target_ulong cur_loc);
+