Add ability to mark memory are read only. Add new API uc_mem_map_ex to allow permissions to be passed. Change MemoryBlock to track created MemoryRegions. Add regress/ro_mem_test.c

This commit is contained in:
Chris Eagle
2015-08-26 13:29:54 -07:00
parent 8aedc1b5d5
commit 00944b6cde
7 changed files with 139 additions and 12 deletions

1
qemu/unicorn_common.h Normal file → Executable file
View File

@ -73,6 +73,7 @@ static inline void uc_common_init(struct uc_struct* uc)
uc->pause_all_vcpus = pause_all_vcpus;
uc->vm_start = vm_start;
uc->memory_map = memory_map;
uc->readonly_mem = memory_region_set_readonly;
if (!uc->release)
uc->release = release_common;