Debugging Methods

Exception Handlers


Exceptions

Modern processors are able to detect and possibly recover from serious faults in executable code. Programs that access unmanaged memory (or write to read-only memory), divide by zero, execute invalid instructions, or other major faults caught by the processor are transferred to an exception handler, usually provided by the operating system. The exception handler is at least responsible for stopping the program from causing any more damage (usually by killing the process), and fixing the problem if possible.

Hardware interrupts and system calls are also typically managed with the same processor mechanisms as exceptions.

Processor Implementations