Handle serialization of cpu context save (#1129)

* Handle the cpu context save in a more pythonic way, so the context can be serialized and reuse in an other process using the same emulator architecture and modes

* Fix type error ; mistakes a size_t uint64_t ; breaks in 32bit...
This commit is contained in:
BAYET
2019-09-07 13:09:17 +02:00
committed by Nguyen Anh Quynh
parent 6c948b43ba
commit 8987ad0fff
3 changed files with 36 additions and 17 deletions

6
uc.c
View File

@ -1302,6 +1302,12 @@ uc_err uc_free(void *mem)
return UC_ERR_OK;
}
UNICORN_EXPORT
size_t uc_context_size(uc_engine *uc)
{
return cpu_context_size(uc->arch, uc->mode);
}
UNICORN_EXPORT
uc_err uc_context_save(uc_engine *uc, uc_context *context)
{