• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <stdio.h>
2 #include <stdlib.h>
3 
4 #include <capstone/capstone.h>
5 
6 void print_string_hex(char *comment, unsigned char *str, size_t len);
7 
print_insn_detail_evm(csh handle,cs_insn * ins)8 void print_insn_detail_evm(csh handle, cs_insn *ins)
9 {
10 	cs_evm *evm;
11 
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 }
27