0

How to set breakpoint condition that checks certain address value, for example: 0xD526C122 = FF.

How can I make a counter that counts how many times breakpoint condition was met without actually breaking the program?

1 Answer 1

0

You can modify breakpoint conditions from Debugger -> Breakpoints -> Breakpoint List, selecting a breakpoint that you wish to edit, and pressing Ctrl + E. IDA provides some information on modifying breakpoints (incl. conditions):

In your case, the condition would amount to get_dword(0xD526C122) == 0xFF.

As for the counter, this has been asked before in this question. Unfortunately, it doesn't seem that there's a native way to do this in IDA, but you can do it easily by using some IDC and breakpoint conditions, as the top comment points out. Do note that their answer doesn't work properly due to bad ordering of the brackets, so I'll post a working solution here:

extern bpcount;
bpcount++;
Message(form("%d. hit\n", bpcount));
return (bpcount>500);

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.