clean-up uc_support() API

- rename to more obviously-named uc_arch_supported()
- remove UC_ARCH_ALL and associated test -- There's no point in having this
  API, and it was improperly implemented anyway.
- remove now unneeded archs_enable() and all_arch
- add UNICORN_HAS_PPC test -- This seems to be only partially implemented
This commit is contained in:
Jonathon Reinhart
2015-08-23 21:10:47 -04:00
parent ee9e2d6a12
commit 11cc9ec9ba
2 changed files with 29 additions and 54 deletions

View File

@@ -78,7 +78,6 @@ typedef enum uc_arch {
UC_ARCH_SPARC, // Sparc architecture
UC_ARCH_M68K, // M68K architecture
UC_ARCH_MAX,
UC_ARCH_ALL = 0xFFFF, // All architectures - for uc_support()
} uc_arch;
// Mode type
@@ -203,16 +202,14 @@ unsigned int uc_version(unsigned int *major, unsigned int *minor);
/*
This API can be used to either ask for archs supported by this library.
Determine if the given architecture is supported by this library.
To check if a particular arch is supported by this library, set @query to
arch mode (UC_ARCH_* value).
To verify if this library supports all the archs, use UC_ARCH_ALL.
@arch: architecture type (UC_ARCH_*)
@return True if this library supports the given arch.
*/
UNICORN_EXPORT
bool uc_support(int query);
bool uc_arch_supported(uc_arch arch);
/*