add new API uc_query() to query internal status of emulator at runtime

This commit is contained in:
Nguyen Anh Quynh
2016-01-23 17:14:44 +08:00
parent 9c2017e115
commit 4dbad9aa9b
4 changed files with 47 additions and 0 deletions

12
uc.c
View File

@ -1190,3 +1190,15 @@ uint32_t uc_mem_regions(uc_engine *uc, uc_mem_region **regions, uint32_t *count)
return UC_ERR_OK;
}
UNICORN_EXPORT
uc_err uc_query(uc_engine *uc, uc_query_type type, size_t *result)
{
switch(uc->arch) {
case UC_ARCH_ARM:
return uc->query(uc, type, result);
default:
return UC_ERR_ARG;
}
return UC_ERR_OK;
}