Remove MemoryBlock struct by consolidating in MemoryRegion. add new API uc_mem_protect. Add regress/mem_protect.c. Drop UC_PROT_EXEC for time being

This commit is contained in:
Chris Eagle
2015-08-27 23:19:32 -07:00
parent bf32753c29
commit 9530b2daff
8 changed files with 379 additions and 36 deletions

View File

@ -15,11 +15,6 @@
QTAILQ_HEAD(CPUTailQ, CPUState);
typedef struct MemoryBlock {
MemoryRegion *region; //inclusive begin
uint64_t end; //exclusive
} MemoryBlock;
typedef struct ModuleEntry {
void (*init)(void);
QTAILQ_ENTRY(ModuleEntry) node;
@ -176,7 +171,7 @@ struct uc_struct {
int thumb; // thumb mode for ARM
// full TCG cache leads to middle-block break in the last translation?
bool block_full;
MemoryBlock *mapped_blocks;
MemoryRegion **mapped_blocks;
uint32_t mapped_block_count;
};