Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
exchain
nebula
Commits
be345b7f
Commit
be345b7f
authored
Sep 23, 2021
by
George Hotz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simple test
parent
033ca9c1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
.gitignore
risc/.gitignore
+1
-0
build.sh
risc/build.sh
+2
-0
run.py
risc/run.py
+4
-4
test.go
risc/test.go
+4
-0
No files found.
risc/.gitignore
View file @
be345b7f
go-ethereum
go-ethereum
test
risc/build.sh
View file @
be345b7f
...
@@ -5,3 +5,5 @@ cp go-ethereum ../risc/go-ethereum
...
@@ -5,3 +5,5 @@ cp go-ethereum ../risc/go-ethereum
cd
../risc
cd
../risc
file go-ethereum
file go-ethereum
GOOS
=
linux
GOARCH
=
mips go build test.go
risc/run.py
View file @
be345b7f
...
@@ -11,7 +11,7 @@ cnt = 0
...
@@ -11,7 +11,7 @@ cnt = 0
def
hook_code
(
uc
,
address
,
size
,
user_data
):
def
hook_code
(
uc
,
address
,
size
,
user_data
):
global
cnt
global
cnt
cnt
+=
1
cnt
+=
1
if
cnt
==
1
000
:
if
cnt
==
2
000
:
raise
Exception
(
"too many instructions"
)
raise
Exception
(
"too many instructions"
)
try
:
try
:
print
(
">>> Tracing instruction at 0x
%
x, instruction size =
%
u"
%
(
address
,
size
))
print
(
">>> Tracing instruction at 0x
%
x, instruction size =
%
u"
%
(
address
,
size
))
...
@@ -22,12 +22,12 @@ def hook_code(uc, address, size, user_data):
...
@@ -22,12 +22,12 @@ def hook_code(uc, address, size, user_data):
except
:
except
:
raise
Exception
(
"ctrl-c"
)
raise
Exception
(
"ctrl-c"
)
elf
=
open
(
"
go-ethereum
"
,
"rb"
)
elf
=
open
(
"
test
"
,
"rb"
)
data
=
elf
.
read
()
data
=
elf
.
read
()
elf
.
seek
(
0
)
elf
.
seek
(
0
)
rte
=
data
.
find
(
b
"
\x08\x02\x2c\x95
"
)
#
rte = data.find(b"\x08\x02\x2c\x95")
print
(
hex
(
rte
))
#
print(hex(rte))
elffile
=
ELFFile
(
elf
)
elffile
=
ELFFile
(
elf
)
#for seg in elffile.iter_segments():
#for seg in elffile.iter_segments():
...
...
risc/test.go
0 → 100644
View file @
be345b7f
package
main
func
main
()
{
}
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