aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGuillaume Ballet <gballet@gmail.com>2018-10-09 15:27:07 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-10-09 15:27:07 +0800
commit97b280668637e29141dcef3793d320185d311e86 (patch)
tree0b48637eb4292ebd7d9ae1be84ed344efcc6513f /core
parent11d0ff6578c34b724436dbeeede726b31b41c8b8 (diff)
downloaddexon-97b280668637e29141dcef3793d320185d311e86.tar
dexon-97b280668637e29141dcef3793d320185d311e86.tar.gz
dexon-97b280668637e29141dcef3793d320185d311e86.tar.bz2
dexon-97b280668637e29141dcef3793d320185d311e86.tar.lz
dexon-97b280668637e29141dcef3793d320185d311e86.tar.xz
dexon-97b280668637e29141dcef3793d320185d311e86.tar.zst
dexon-97b280668637e29141dcef3793d320185d311e86.zip
core/asm: Use hexadecimal addresses in assembly dumps (#17870)
Diffstat (limited to 'core')
-rw-r--r--core/asm/asm.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/asm/asm.go b/core/asm/asm.go
index ce22f93f9..4257198cc 100644
--- a/core/asm/asm.go
+++ b/core/asm/asm.go
@@ -109,9 +109,9 @@ func PrintDisassembled(code string) error {
it := NewInstructionIterator(script)
for it.Next() {
if it.Arg() != nil && 0 < len(it.Arg()) {
- fmt.Printf("%06v: %v 0x%x\n", it.PC(), it.Op(), it.Arg())
+ fmt.Printf("%05x: %v 0x%x\n", it.PC(), it.Op(), it.Arg())
} else {
- fmt.Printf("%06v: %v\n", it.PC(), it.Op())
+ fmt.Printf("%05x: %v\n", it.PC(), it.Op())
}
}
return it.Error()
@@ -124,9 +124,9 @@ func Disassemble(script []byte) ([]string, error) {
it := NewInstructionIterator(script)
for it.Next() {
if it.Arg() != nil && 0 < len(it.Arg()) {
- instrs = append(instrs, fmt.Sprintf("%06v: %v 0x%x\n", it.PC(), it.Op(), it.Arg()))
+ instrs = append(instrs, fmt.Sprintf("%05x: %v 0x%x\n", it.PC(), it.Op(), it.Arg()))
} else {
- instrs = append(instrs, fmt.Sprintf("%06v: %v\n", it.PC(), it.Op()))
+ instrs = append(instrs, fmt.Sprintf("%05x: %v\n", it.PC(), it.Op()))
}
}
if err := it.Error(); err != nil {