bigendian=False):
q = QemuController(program.binfile.name, bigendian)
q.connect()
- q.set_endian(True) # how qemu gets/sets data, NOT sets arch
+ q.set_endian(True) # easier to set variables this way
# Run to the start of the program
if initial_mem:
print ("msr", bigendian, hex(msr))
if bigendian:
msr &= ~(1<<0)
+ msr = msr & ((1<<64)-1)
else:
msr |= (1<<0)
q.gdb_eval('$msr=%d' % msr)
if extra_break_addr:
q.break_address(extra_break_addr)
q.gdb_continue()
- q.set_endian(False) # how qemu gets/sets data, NOT sets arch
+ q.set_endian(bigendian)
return q