libethcore/Transactionbase.cpp
In function baseGasRequired, print the initial g, it can be 'transaction cost' or 'create cost', and print g again before it gets returned, now it will contain the cost for the sent in the transaction.
libethereum/Executive.cpp
In function finalize, print gasUsed() (inside the last if statement):
https://github.com/ethereum/cpp-ethereum/blob/9a13ce49082eee29e5d9159c3549087c675fa50c/libethereum/Executive.cpp#L507
libethereum/State.cpp
In function State::execute, before the TransactionReceipt is created, print startGasUsed and e.gasUsed():
https://github.com/ethereum/cpp-ethereum/blob/aa6e085e593dad863e0ed9888c65f488b8348a5e/libethereum/State.cpp#L579
libevm/EVMC.cpp
In function EVMC::exec, before the switch statement print the status r.status(), the initial value of io_gas and the result of r.gasLeft():
hera/src/eei.cpp
In function takeGas print argument gas:
https://github.com/ewasm/hera/blob/a6c07f975e890b0da3ee07ed1ddf0d9247b5b5c1/src/eei.cpp#L762