So I am trying to run an app and collect information at certain points. No biggie, right? Wrong. Check this simple example:

import ida_dbg
ida_dbg.step_over() #or runto()
eax = ida_dbg.get_reg_val("eax")
print("eax: ", eax)

throws an exception

Exception: Failed to retrieve register value

But Individually it works. So if I do ONLY a "ida_dbg.step_over()", that works. And if do ONLY a 'get_reg_val("eax")' that works too. Only in combination it fails.

Now, you might think this is because step_over only posts a request, but the documentation explicitly says otherwise and provides a request_step_over() for that purpose.

Please, can someone enlighten me and show me how I can step over my program and collect register values after each step?

1 Answer 1


Ah! So despite the function being advertised otherwise it is still async and I have to call

ida_dbg.wait_for_next_event(ida_dbg.WFNE_SUSP, -1)

Is this the correct solution?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.