Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (36 sloc) 1.46 KB
import struct
def read_writes(count, f):
print "reading from write log"
finished_line = False
for write in range(count):
dest, val = struct.unpack("QQ",
print "write %s to %s" % (val, hex(dest))
except struct.error:
print "write log ended abruptly"
print "reading from return log"
finished_line = False
with open("return-logger", "rb") as return_log:
with open("write-logger", "rb") as write_log:
while 1:
write_count = struct.unpack("Q",[0]
print "write_count: %s" % write_count
if write_count > 0: read_writes(write_count, write_log)
finished_line = False
flag = struct.unpack("b",[0]
print "flag: %s" % flag
if flag & 0b1:
print "rax: %s" % struct.unpack("Q",
if flag & 0b10:
print "rdx: %s" % struct.unpack("Q",
if flag & 0b100:
print "xmm0: %f %f %f %f" % struct.unpack("ffff",
if flag & 0b1000:
print "xmm1: %f %f %f %f" % struct.unpack("ffff",
finished_line = True
except struct.error:
if finished_line:
print "finished reading from return log"
print "return log ended abruptly"