Data Breakpoints

The Visual Studio debugger supports a kind of breakpoint called Data Breakpoint, sometimes it is also called watchpoint. Data breakpoint is architecture dependant, as it requires hardware support provided by CPU. For x86, this will be the DR (Debug Register). The following code demonstrates how to use the x86 debug register by implementing a very simple native debugger. #define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <stdio.h>…

2