Add code to handle non-readable memory

This commit is contained in:
Chris Eagle
2015-08-28 03:42:25 -07:00
parent aa509cc00f
commit 3452b47f7c
5 changed files with 83 additions and 12 deletions

6
uc.c
View File

@@ -89,8 +89,10 @@ const char *uc_strerror(uc_err code)
return "Invalid hook type (UC_ERR_HOOK)";
case UC_ERR_MAP:
return "Invalid memory mapping (UC_ERR_MAP)";
case UC_ERR_MEM_WRITE_RO:
return "Invalid memory write (UC_ERR_MEM_WRITE_RO)";
case UC_ERR_MEM_WRITE_NW:
return "Write to non-writable (UC_ERR_MEM_WRITE_NW)";
case UC_ERR_MEM_READ_NR:
return "Read from non-readable (UC_ERR_MEM_READ_NR)";
}
}