Commit be345b7f authored by George Hotz's avatar George Hotz

simple test

parent 033ca9c1
go-ethereum go-ethereum
test
...@@ -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
...@@ -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 == 1000: if cnt == 2000:
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():
......
package main
func main() {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment