import immlib
    def main(args):
        imm = immlib.Debugger()
        imm.log("EAX: {}".format(imm.getRegs()['EAX']))

    return "OK"


EAX: 0
Breakpoint at 0x411077

The log write happens before setBreakpoint() according to the log.

What is the problem?


It looks like "Breakpoint at" means "the breakpoint was hit", not "breakpoint was set".

The breakpoint can be only triggered once the program is running. Since you call log() before run(), the log message is printed first. If you want to log when the breakpoint is hit, you need to use another approach (not familiar with ImmDbg API so can't recommend anything specific).

  • You need to use a BpHook, see the documentation for more information – JeffreyZ Jul 27 '16 at 4:27
  • @JeffreyZ: you probably should post that as an answer (with a small example) – Igor Skochinsky Jul 27 '16 at 11:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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