hook_code_stop_emu.py: show PC before asserting

This commit is contained in:
Willi Ballenthin 2015-11-02 10:05:00 -05:00
parent 1a8ca49db1
commit 11dfaf4dec
1 changed files with 4 additions and 2 deletions

View File

@ -67,15 +67,17 @@ class HookCodeStopEmuTest(regress.RegressTest):
# 0x1016: 4883c201 add rdx, 1
stepper = SingleStepper(mu, self)
self.assertEqual(0x1000, mu.reg_read(UC_X86_REG_RIP), "Unexpected PC")
showpc(mu)
self.assertEqual(0x1000, mu.reg_read(UC_X86_REG_RIP), "Unexpected PC")
stepper.step()
showpc(mu)
self.assertEqual(0x1007, mu.reg_read(UC_X86_REG_RIP),
"Emulator failed to stop after one instruction")
showpc(mu)
stepper.step()
showpc(mu)
self.assertEqual(0x1009, mu.reg_read(UC_X86_REG_RIP),
"Emulator failed to stop after one instruction")