support memory redirection, so the issue #217 is fixed

This commit is contained in:
Nguyen Anh Quynh
2015-10-27 14:37:03 +08:00
parent cea1cf210d
commit 3a36e327ab
4 changed files with 26 additions and 0 deletions

4
uc.c
View File

@ -811,6 +811,10 @@ MemoryRegion *memory_mapping(struct uc_struct* uc, uint64_t address)
if (uc->mapped_block_count == 0)
return NULL;
if (uc->mem_redirect) {
address = uc->mem_redirect(address);
}
// try with the cache index first
i = uc->mapped_block_cache_index;