What is a trap instruction?
A trap (also known as breakpoint or software interrupt) is an intentional exception. In general, a trapped program is stopped immediately and enters a debugging environment; the latter typically shows the value of program variables and allows to continue execution, to skip trapped instructions or to terminate execution.