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

View File

@ -54,6 +54,9 @@ typedef void (*uc_readonly_mem_t)(MemoryRegion *mr, bool readonly);
// which interrupt should make emulation stop?
typedef bool (*uc_args_int_t)(int intno);
// some architecture redirect virtual memory to physical memory like Mips
typedef uint64_t (*uc_mem_redirect_t)(uint64_t address);
struct hook_struct {
int hook_type; // uc_tracecode_type & uc_tracemem_type
@ -94,6 +97,7 @@ struct uc_struct {
uc_args_uc_ram_size_t memory_map;
uc_mem_unmap_t memory_unmap;
uc_readonly_mem_t readonly_mem;
uc_mem_redirect_t mem_redirect;
// list of cpu
void* cpu;