cstool_evm.c
Go to the documentation of this file.
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 
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 }
xds_interop_client.str
str
Definition: xds_interop_client.py:487
print_string_hex
void print_string_hex(char *comment, unsigned char *str, size_t len)
cs_evm::fee
unsigned int fee
gas fee for the instruction
Definition: evm.h:21
printf
_Use_decl_annotations_ int __cdecl printf(const char *_Format,...)
Definition: cs_driver.c:91
capstone.h
print_insn_detail_evm
void print_insn_detail_evm(csh handle, cs_insn *ins)
Definition: cstool_evm.c:8
csh
size_t csh
Definition: capstone.h:71
cs_evm
Instruction structure.
Definition: evm.h:18
handle
static csh handle
Definition: test_arm_regression.c:16
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46
cs_evm::pop
unsigned char pop
number of items popped from the stack
Definition: evm.h:19
cs_evm::push
unsigned char push
number of items pushed into the stack
Definition: evm.h:20


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:02