1 /* Capstone testing regression */
2 /* By Do Minh Tuan <tuanit96@gmail.com>, 02-2019 */
3
4
5 #include "factory.h"
6
get_detail_evm(csh * handle,cs_mode mode,cs_insn * ins)7 char *get_detail_evm(csh *handle, cs_mode mode, cs_insn *ins)
8 {
9 cs_evm *evm;
10 char *result;
11
12 result = (char *)malloc(sizeof(char));
13 result[0] = '\0';
14
15 if (ins->detail == NULL)
16 return result;
17
18 evm = &(ins->detail->evm);
19
20 if (evm->pop)
21 add_str(&result, " ; Pop: %u", evm->pop);
22
23 if (evm->push)
24 add_str(&result, " ; Push: %u", evm->push);
25
26 if (evm->fee)
27 add_str(&result, " ; Gas fee: %u", evm->fee);
28
29 return result;
30 }
31