Rizin
unix-like reverse engineering framework and cli tools
EVMModule.c
Go to the documentation of this file.
1 /* Capstone Disassembly Engine */
2 /* By Nguyen Anh Quynh, 2018 */
3 
4 #ifdef CAPSTONE_HAS_EVM
5 
6 #include "../../cs_priv.h"
7 #include "EVMDisassembler.h"
8 #include "EVMInstPrinter.h"
9 #include "EVMMapping.h"
10 #include "EVMModule.h"
11 
12 cs_err EVM_global_init(cs_struct *ud)
13 {
14  // verify if requested mode is valid
15  if (ud->mode)
16  return CS_ERR_MODE;
17 
18  ud->printer = EVM_printInst;
19  ud->printer_info = NULL;
24 
25  return CS_ERR_OK;
26 }
27 
29 {
30  return CS_ERR_OK;
31 }
32 
33 #endif
bool EVM_getInstruction(csh ud, const uint8_t *code, size_t code_len, MCInst *MI, uint16_t *size, uint64_t address, void *inst_info)
void EVM_printInst(MCInst *MI, struct SStream *O, void *PrinterInfo)
Definition: EVMInstPrinter.c:8
const char * EVM_insn_name(csh handle, unsigned int id)
const char * EVM_group_name(csh handle, unsigned int id)
void EVM_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id)
cs_err EVM_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err EVM_global_init(cs_struct *ud)
static mcore_handle handle
Definition: asm_mcore.c:8
cs_opt_type
Runtime option for the disassembled engine.
Definition: capstone.h:168
static int value
Definition: cmd_api.c:93
#define NULL
Definition: cris-opc.c:27
int type
Definition: mipsasm.c:17
int CS_ERR_OK
Definition: __init__.py:235
int CS_ERR_MODE
Definition: __init__.py:240
GetName_t insn_name
Definition: cs_priv.h:62
void * printer_info
Definition: cs_priv.h:58
Printer_t printer
Definition: cs_priv.h:57
GetID_t insn_id
Definition: cs_priv.h:64
GetName_t group_name
Definition: cs_priv.h:63
Disasm_t disasm
Definition: cs_priv.h:59
cs_mode mode
Definition: cs_priv.h:56