From 73c7c9aadc202a007688b9c83ced99814712e63e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 3 Sep 2018 10:40:10 -0400 Subject: [PATCH] unicorn_common: Fix unicorn memory functions failing These functions, over the course of backporting qemu's newer changes, were altered to return non-zero in the case of success, so we need to update the cpu read/write functions as necessary. --- qemu/unicorn_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/unicorn_common.h b/qemu/unicorn_common.h index 71adf268..9e58e2a1 100644 --- a/qemu/unicorn_common.h +++ b/qemu/unicorn_common.h @@ -10,13 +10,13 @@ static inline bool cpu_physical_mem_read(AddressSpace *as, hwaddr addr, uint8_t *buf, int len) { - return !cpu_physical_memory_rw(as, addr, (void *)buf, len, 0); + return cpu_physical_memory_rw(as, addr, (void *)buf, len, 0); } static inline bool cpu_physical_mem_write(AddressSpace *as, hwaddr addr, const uint8_t *buf, int len) { - return !cpu_physical_memory_rw(as, addr, (void *)buf, len, 1); + return cpu_physical_memory_rw(as, addr, (void *)buf, len, 1); } void tb_cleanup(struct uc_struct *uc);