DBG: updated keystone
This commit is contained in:
parent
ff9b600001
commit
27140adfec
|
@ -130,7 +130,7 @@ PLUG_IMPEXP bool _plugin_load(const char* pluginName)
|
|||
return pluginload(pluginName);
|
||||
}
|
||||
|
||||
duint _plugin_hash(void* data, size_t size)
|
||||
duint _plugin_hash(const void* data, duint size)
|
||||
{
|
||||
return murmurhash(data, int(size));
|
||||
}
|
||||
|
|
|
@ -252,7 +252,7 @@ PLUG_IMPEXP bool _plugin_registerexprfunction(int pluginHandle, const char* name
|
|||
PLUG_IMPEXP bool _plugin_unregisterexprfunction(int pluginHandle, const char* name);
|
||||
PLUG_IMPEXP bool _plugin_unload(const char* pluginName);
|
||||
PLUG_IMPEXP bool _plugin_load(const char* pluginName);
|
||||
PLUG_IMPEXP duint _plugin_hash(void* data, size_t size);
|
||||
PLUG_IMPEXP duint _plugin_hash(const void* data, duint size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -143,22 +143,33 @@ typedef enum ks_err
|
|||
KS_ERR_ASM_MNEMONICFAIL,
|
||||
} ks_err;
|
||||
|
||||
// Resolver callback to provide value for a missing symbol in @symbol.
|
||||
// To handle a symbol, the resolver must put value of the symbol in @value,
|
||||
// then returns True.
|
||||
// If we do not resolve a missing symbol, this function must return False.
|
||||
// In that case, ks_asm() would eventually return with error KS_ERR_ASM_SYMBOL_MISSING.
|
||||
|
||||
// To register the resolver, pass its function address to ks_option(), using
|
||||
// option KS_OPT_SYM_RESOLVER. For example, see samples/sample.c.
|
||||
typedef bool (*ks_sym_resolver)(const char* symbol, uint64_t* value);
|
||||
|
||||
// Runtime option for the Keystone engine
|
||||
typedef enum ks_opt_type
|
||||
{
|
||||
KS_OPT_SYNTAX = 1, // Choose syntax for input assembly
|
||||
KS_OPT_SYNTAX = 1, // Choose syntax for input assembly
|
||||
KS_OPT_SYM_RESOLVER, // Set symbol resolver callback
|
||||
} ks_opt_type;
|
||||
|
||||
|
||||
// Runtime option value (associated with ks_opt_type above)
|
||||
typedef enum ks_opt_value
|
||||
{
|
||||
KS_OPT_SYNTAX_INTEL = 1 << 0, // X86 Intel syntax - default on X86 (KS_OPT_SYNTAX).
|
||||
KS_OPT_SYNTAX_ATT = 1 << 1, // X86 ATT asm syntax (KS_OPT_SYNTAX).
|
||||
KS_OPT_SYNTAX_NASM = 1 << 2, // X86 Nasm syntax (KS_OPT_SYNTAX).
|
||||
KS_OPT_SYNTAX_MASM = 1 << 3, // X86 Masm syntax (KS_OPT_SYNTAX) - unsupported yet.
|
||||
KS_OPT_SYNTAX_GAS = 1 << 4, // X86 GNU GAS syntax (KS_OPT_SYNTAX).
|
||||
KS_OPT_SYNTAX_INTEL = 1 << 0, // X86 Intel syntax - default on X86 (KS_OPT_SYNTAX).
|
||||
KS_OPT_SYNTAX_ATT = 1 << 1, // X86 ATT asm syntax (KS_OPT_SYNTAX).
|
||||
KS_OPT_SYNTAX_NASM = 1 << 2, // X86 Nasm syntax (KS_OPT_SYNTAX).
|
||||
KS_OPT_SYNTAX_MASM = 1 << 3, // X86 Masm syntax (KS_OPT_SYNTAX) - unsupported yet.
|
||||
KS_OPT_SYNTAX_GAS = 1 << 4, // X86 GNU GAS syntax (KS_OPT_SYNTAX).
|
||||
KS_OPT_SYNTAX_RADIX16 = 1 << 5, // All immediates are in hex format (i.e 12 is 0x12)
|
||||
} ks_opt_value;
|
||||
|
||||
|
||||
|
@ -261,7 +272,7 @@ const char* ks_strerror(ks_err code);
|
|||
Set option for Keystone engine at runtime
|
||||
|
||||
@ks: handle returned by ks_open()
|
||||
@type: type of option to be set
|
||||
@type: type of option to be set. See ks_opt_type
|
||||
@value: option value corresponding with @type
|
||||
|
||||
@return: KS_ERR_OK on success, or other value on failure.
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue