Debugging
Debugging is the process of fixing bugs in a program. Debuggers are those programs that can run and watchdog the execution of another program. So, the debugger can have control over the execution of the target program and can monitor or alter the memory and variables of the targeted program.
Breakpoints
Breakpoints help to stop the execution of the target program within the debugger at a location where we choose. At that time, execution stops and control is passed to the debugger.
Breakpoints come in two different forms:
Hardware Breakpoints: Hardware breakpoints require hardware support from the CPU. They use special debug registers. These registers contain the breakpoint addresses, control information, and breakpoint type.
Software Breakpoints: A software breakpoint replaces the original instruction with an instruction that traps the debugger. This can only break on execution. The main difference between them is that hardware breakpoints can be set on memory. But, software breakpoints...