add architecture query (#842)

This commit is contained in:
misson20000
2017-05-20 18:47:02 -07:00
committed by Nguyen Anh Quynh
parent 14222bd5f0
commit 3fdb2d2442
7 changed files with 11 additions and 0 deletions

5
uc.c
View File

@@ -1155,6 +1155,11 @@ uc_err uc_query(uc_engine *uc, uc_query_type type, size_t *result)
return UC_ERR_OK;
}
if (type == UC_QUERY_ARCH) {
*result = uc->arch;
return UC_ERR_OK;
}
switch(uc->arch) {
#ifdef UNICORN_HAS_ARM
case UC_ARCH_ARM: