mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 23:25:22 +00:00
vm: pretty-print ST*/LD* opcodes
This commit is contained in:
parent
7d08d38cd2
commit
9cc6e22365
1 changed files with 2 additions and 0 deletions
|
@ -202,6 +202,8 @@ func (v *VM) PrintOps() {
|
|||
opcode.PUSHINT64, opcode.PUSHINT128, opcode.PUSHINT256:
|
||||
val := bigint.FromBytes(parameter)
|
||||
desc = fmt.Sprintf("%d (%x)", val, parameter)
|
||||
case opcode.LDLOC, opcode.STLOC, opcode.LDARG, opcode.STARG, opcode.LDSFLD, opcode.STSFLD:
|
||||
desc = fmt.Sprintf("%d (%x)", parameter[0], parameter)
|
||||
default:
|
||||
if utf8.Valid(parameter) {
|
||||
desc = fmt.Sprintf("%x (%q)", parameter, parameter)
|
||||
|
|
Loading…
Reference in a new issue