Trap flag explained

A trap flag permits operation of a processor in single-step mode. If such a flag is available, debuggers can use it to step through the execution of a computer program.[1] [2]

The trap flag, when set, causes the machine to trap after executing one instruction. The trap handler can cause a debugger to be notified; the debugger can then inspect the contents of registers and memory locations and either continue or stop and let the user of the debugger examine additional data in the program.

Notes and References

  1. Book: Processor Handbook PDP-11/20/15/R20 . 11 . . 1971.
  2. Web site: Intel 64 and IA-32 Architectures Software Developer's Manual . live . https://web.archive.org/web/20241109055756/https://cdrdv2-public.intel.com/835781/325462-sdm-vol-1-2abcd-3abcd-4.pdf . November 9, 2024 . November 15, 2024.