mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-30 20:16:52 +00:00
hook_code_stop_emu.py: show PC before asserting
This commit is contained in:
parent
1a8ca49db1
commit
11dfaf4dec
|
@ -67,15 +67,17 @@ class HookCodeStopEmuTest(regress.RegressTest):
|
||||||
# 0x1016: 4883c201 add rdx, 1
|
# 0x1016: 4883c201 add rdx, 1
|
||||||
|
|
||||||
stepper = SingleStepper(mu, self)
|
stepper = SingleStepper(mu, self)
|
||||||
self.assertEqual(0x1000, mu.reg_read(UC_X86_REG_RIP), "Unexpected PC")
|
|
||||||
showpc(mu)
|
showpc(mu)
|
||||||
|
self.assertEqual(0x1000, mu.reg_read(UC_X86_REG_RIP), "Unexpected PC")
|
||||||
|
|
||||||
|
|
||||||
stepper.step()
|
stepper.step()
|
||||||
|
showpc(mu)
|
||||||
self.assertEqual(0x1007, mu.reg_read(UC_X86_REG_RIP),
|
self.assertEqual(0x1007, mu.reg_read(UC_X86_REG_RIP),
|
||||||
"Emulator failed to stop after one instruction")
|
"Emulator failed to stop after one instruction")
|
||||||
showpc(mu)
|
|
||||||
|
|
||||||
stepper.step()
|
stepper.step()
|
||||||
|
showpc(mu)
|
||||||
self.assertEqual(0x1009, mu.reg_read(UC_X86_REG_RIP),
|
self.assertEqual(0x1009, mu.reg_read(UC_X86_REG_RIP),
|
||||||
"Emulator failed to stop after one instruction")
|
"Emulator failed to stop after one instruction")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue