1 /* Capstone Disassembly Engine */ 2 /* By Spike, xwings 2019 */ 3 4 #ifdef CAPSTONE_HAS_WASM 5 6 #include "../../cs_priv.h" 7 #include "WASMDisassembler.h" 8 #include "WASMInstPrinter.h" 9 #include "WASMMapping.h" 10 #include "WASMModule.h" 11 WASM_global_init(cs_struct * ud)12cs_err WASM_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 = WASM_printInst; 19 ud->printer_info = NULL; 20 ud->insn_id = WASM_get_insn_id; 21 ud->insn_name = WASM_insn_name; 22 ud->group_name = WASM_group_name; 23 ud->disasm = WASM_getInstruction; 24 25 return CS_ERR_OK; 26 } 27 WASM_option(cs_struct * handle,cs_opt_type type,size_t value)28cs_err WASM_option(cs_struct *handle, cs_opt_type type, size_t value) 29 { 30 return CS_ERR_OPTION; 31 } 32 33 #endif 34