Rizin
unix-like reverse engineering framework and cli tools
EVMInstPrinter.h File Reference
#include "capstone/capstone.h"
#include "../../MCInst.h"
#include "../../SStream.h"
#include "../../cs_priv.h"

Go to the source code of this file.

Functions

void EVM_printInst (MCInst *MI, struct SStream *O, void *Info)
 

Function Documentation

◆ EVM_printInst()

void EVM_printInst ( MCInst MI,
struct SStream O,
void *  Info 
)

Definition at line 8 of file EVMInstPrinter.c.

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 }
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
cs_struct * csh
Definition: MCInst.h:97
unsigned char evm_data[32]
Definition: MCInst.h:110
unsigned Opcode
Definition: MCInst.h:93

References MCInst::csh, MCInst::evm_data, EVM_INS_PUSH1, EVM_INS_PUSH32, EVM_insn_name(), i, O, MCInst::Opcode, SStream_concat(), and SStream_concat0().