From 079f177cdaf43f017bf320912cd97f86dea586be Mon Sep 17 00:00:00 2001 From: van Hauser Date: Sat, 8 Feb 2020 15:41:17 +0100 Subject: persistent mode doc --- examples/qemu_persistent_hook/read_into_rdi.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples/qemu_persistent_hook') diff --git a/examples/qemu_persistent_hook/read_into_rdi.c b/examples/qemu_persistent_hook/read_into_rdi.c index fd4c9000..3994e790 100644 --- a/examples/qemu_persistent_hook/read_into_rdi.c +++ b/examples/qemu_persistent_hook/read_into_rdi.c @@ -37,8 +37,12 @@ enum { void afl_persistent_hook(uint64_t* regs, uint64_t guest_base) { + // In this example the register RDI is pointing to the memory location + // of the target buffer, and the length of the input is in RAX. + printf("reading into %p\n", regs[R_EDI]); size_t r = read(0, g2h(regs[R_EDI]), 1024); + regs[R_EAX] = r; printf("readed %ld bytes\n", r); } -- cgit 1.4.1