blob: 692a3f0a13cf54a66cfc0f17651e9d35df523126 [file] [log] [blame]
Nguyen Anh Quynh863ec0a2018-03-31 17:32:22 +08001#include <stdio.h>
2#include <stdlib.h>
3
4#include <capstone/capstone.h>
5
6void print_string_hex(char *comment, unsigned char *str, size_t len);
7
8void print_insn_detail_evm(csh handle, cs_insn *ins)
9{
10 cs_evm *evm;
Nguyen Anh Quynh863ec0a2018-03-31 17:32:22 +080011
12 // detail can be NULL on "data" instruction if SKIPDATA option is turned ON
13 if (ins->detail == NULL)
14 return;
15
16 evm = &(ins->detail->evm);
17
18 if (evm->pop)
19 printf("\tPop: %u\n", evm->pop);
20
21 if (evm->push)
22 printf("\tPush: %u\n", evm->push);
23
24 if (evm->fee)
25 printf("\tGas fee: %u\n", evm->fee);
26}