diff options
author | Dominik Maier <domenukk@gmail.com> | 2020-02-10 00:19:25 +0100 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2020-02-10 00:19:25 +0100 |
commit | bf1898736915d34906704f82202d1a8890a3cec4 (patch) | |
tree | ab450a0a67ea5c2ec14c5ac9536e4a379d16eb3d /qemu_mode/patches/afl-qemu-common.h | |
parent | e19e06aba7e81a37f5f1a9974f061ab63bc86986 (diff) | |
parent | 33c18c36db70859fc484dd41a317634809d5c043 (diff) | |
download | afl++-bf1898736915d34906704f82202d1a8890a3cec4.tar.gz |
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus into unicorn
Diffstat (limited to 'qemu_mode/patches/afl-qemu-common.h')
-rw-r--r-- | qemu_mode/patches/afl-qemu-common.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/qemu_mode/patches/afl-qemu-common.h b/qemu_mode/patches/afl-qemu-common.h index 4d651385..4303a5e6 100644 --- a/qemu_mode/patches/afl-qemu-common.h +++ b/qemu_mode/patches/afl-qemu-common.h @@ -35,11 +35,18 @@ #define __AFL_QEMU_COMMON #include "../../config.h" +#include "../../include/cmplog.h" -#ifndef CPU_NB_REGS -#define AFL_REGS_NUM 1000 -#else +#define PERSISTENT_DEFAULT_MAX_CNT 1000 + +#ifdef CPU_NB_REGS #define AFL_REGS_NUM CPU_NB_REGS +#elif TARGET_ARM +#define AFL_REGS_NUM 32 +#elif TARGET_AARCH64 +#define AFL_REGS_NUM 32 +#else +#define AFL_REGS_NUM 100 #endif /* NeverZero */ @@ -56,6 +63,8 @@ #define INC_AFL_AREA(loc) afl_area_ptr[loc]++ #endif +typedef void (*afl_persistent_hook_fn)(uint64_t *regs, uint64_t guest_base); + /* Declared in afl-qemu-cpu-inl.h */ extern unsigned char *afl_area_ptr; @@ -69,11 +78,16 @@ extern unsigned char is_persistent; extern target_long persistent_stack_offset; extern unsigned char persistent_first_pass; extern unsigned char persistent_save_gpr; -extern target_ulong persistent_saved_gpr[AFL_REGS_NUM]; +extern uint64_t persistent_saved_gpr[AFL_REGS_NUM]; extern int persisent_retaddr_offset; +extern afl_persistent_hook_fn afl_persistent_hook_ptr; + extern __thread abi_ulong afl_prev_loc; +extern struct cmp_map *__afl_cmp_map; +extern __thread u32 __afl_cmp_counter; + void afl_debug_dump_saved_regs(); void afl_persistent_loop(); |