Rizin
unix-like reverse engineering framework and cli tools
EVMInstPrinter.c
Go to the documentation of this file.
1 /* Capstone Disassembly Engine */
2 /* By Nguyen Anh Quynh, 2018 */
3 
4 #include "EVMInstPrinter.h"
5 #include "EVMMapping.h"
6 
7 
8 void EVM_printInst(MCInst *MI, struct SStream *O, void *PrinterInfo)
9 {
11 
12  if (MI->Opcode >= EVM_INS_PUSH1 && MI->Opcode <= EVM_INS_PUSH32) {
13  unsigned int i;
14 
15  SStream_concat0(O, "\t");
16  for (i = 0; i < MI->Opcode - EVM_INS_PUSH1 + 1; i++) {
17  SStream_concat(O, "%02x", MI->evm_data[i]);
18  }
19  }
20 }
void EVM_printInst(MCInst *MI, struct SStream *O, void *PrinterInfo)
Definition: EVMInstPrinter.c:8
const char * EVM_insn_name(csh handle, unsigned int id)
void SStream_concat(SStream *ss, const char *fmt,...)
Definition: SStream.c:45
void SStream_concat0(SStream *ss, const char *s)
Definition: SStream.c:31
lzma_index ** i
Definition: index.h:629
size_t csh
Definition: capstone.h:71
@ EVM_INS_PUSH1
Definition: evm.h:83
@ EVM_INS_PUSH32
Definition: evm.h:114
#define O
Definition: rcond.c:14
Definition: MCInst.h:88
cs_struct * csh
Definition: MCInst.h:97
unsigned char evm_data[32]
Definition: MCInst.h:110
unsigned Opcode
Definition: MCInst.h:93
Definition: SStream.h:9