How can I set break point when the value on specific address is changed while I debug it with ida
1 Answer
This type of breakpoint is done through the use of hardware breakpoints. Hardware breakpoints set the debug registers for the thread context (dr0-dr3). The first four debug registers specify the address for the breakpoint, dr7 enables you to specify the condition for each hardware breakpoint set (write, general access, execute).
IDA implements this in its debugger. If you press CTRL+ALT+B and right click and then click insert, you can specify the proper debugging conditions. All types of access breakpoints will be implemented through hardware breakpoints unless you use another type of debugger that arbitrarily throws exceptions such as page exceptions.
To set the debugging conditions for access breakpoints when you specify the address/location, make sure that the hardware checkbox is enabled and then go to the hardware breakpoint mode group and you can toggle which conditions you want for your breakpoint (read, write, execute, access) and then hit OK.
Then the address/location specified in the breakpoint will be triggered when the proper conditions are met.