rename uc_regstate_restore to uc_context_restore, uc_context_save to uc_context_save

This commit is contained in:
Nguyen Anh Quynh
2016-10-07 10:03:19 +08:00
parent b7cdbe7a88
commit 73577cbcd1
5 changed files with 26 additions and 26 deletions

View File

@ -625,33 +625,33 @@ UNICORN_EXPORT
uc_err uc_mem_regions(uc_engine *uc, uc_mem_region **regions, uint32_t *count);
/*
Save a copy of the current state's registers
Save a copy of the internal CPU context.
This API should be used to efficiently make or update a saved copy of the
state's registers.
internal CPU state.
@uc: handle returned by uc_open()
@buffer: pointer to the region to store the registers in. The first call to
@buffer: pointer to the region to store the context in. The first call to
this function should pass NULL in this parameter, so a region of the
appropriate size for the current architecure can be allocated. Further calls
appropriate size for the current architecture can be allocated. Further calls
to this function may pass in the return value of previous calls.
@return a pointer to the region the registers were saved in. If buffer was
@return a pointer to the region the contexxt was saved in. If buffer was
NULL, this is a newly allocated region, otherwise it is the same as buffer.
Any allocation performed by this function must be freed by the user.
*/
UNICORN_EXPORT
void *uc_regstate_save(uc_engine *uc, void *buffer);
void *uc_context_save(uc_engine *uc, void *buffer);
/*
Restore the current state's registers from a saved copy
This API should be used to roll the CPU register state back to a previous
state saved by uc_regstate_save().
Restore the current CPU context from a saved copy.
This API should be used to roll the CPU context back to a previous
state saved by uc_context_save().
@uc: handle returned by uc_open()
@buffer: pointer returned by uc_regstate_save()
@buffer: pointer returned by uc_context_save()
*/
UNICORN_EXPORT
void uc_regstate_restore(uc_engine *uc, void *buffer);
void uc_context_restore(uc_engine *uc, void *buffer);
#ifdef __cplusplus
}