Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
97b28066
Commit
97b28066
authored
Oct 09, 2018
by
Guillaume Ballet
Committed by
Péter Szilágyi
Oct 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/asm: Use hexadecimal addresses in assembly dumps (#17870)
parent
11d0ff65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
asm.go
core/asm/asm.go
+4
-4
No files found.
core/asm/asm.go
View file @
97b28066
...
...
@@ -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
(
"%0
6v
: %v 0x%x
\n
"
,
it
.
PC
(),
it
.
Op
(),
it
.
Arg
())
fmt
.
Printf
(
"%0
5x
: %v 0x%x
\n
"
,
it
.
PC
(),
it
.
Op
(),
it
.
Arg
())
}
else
{
fmt
.
Printf
(
"%0
6v
: %v
\n
"
,
it
.
PC
(),
it
.
Op
())
fmt
.
Printf
(
"%0
5x
: %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
(
"%0
6v
: %v 0x%x
\n
"
,
it
.
PC
(),
it
.
Op
(),
it
.
Arg
()))
instrs
=
append
(
instrs
,
fmt
.
Sprintf
(
"%0
5x
: %v 0x%x
\n
"
,
it
.
PC
(),
it
.
Op
(),
it
.
Arg
()))
}
else
{
instrs
=
append
(
instrs
,
fmt
.
Sprintf
(
"%0
6v
: %v
\n
"
,
it
.
PC
(),
it
.
Op
()))
instrs
=
append
(
instrs
,
fmt
.
Sprintf
(
"%0
5x
: %v
\n
"
,
it
.
PC
(),
it
.
Op
()))
}
}
if
err
:=
it
.
Error
();
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment