和cpu结构有关,
The single step exception(INT 1) occurs after every instruction if the trace bit in the flags register is equal to one.
When this exception occurs, the return address on the stack is the address of the next instruction to execute. The trap handler can decode this opcode and decide how to proceed. Most debuggers use the trace exception to check for watchpoints and other events that change dynamically during program execution. Debuggers that use the trace exception for single stepping often disassemble the next instruction using the return address on the stack as a pointer to that instruction's opcode bytes.(摘自<The Art of Assembly language>)
如此就可以在中断的时候获得程序当前的执行情况了。