Reputation: 2322
I'm looking for a trap instruction that raises a hardware exception so that the program will stop abruptly and the debugger can show where this point is.
ud2
seems to do the job, but is there a one byte option?
Upvotes: 0
Views: 919
Reputation: 93082
Use the int3
instruction with opcode cc
. When debugging the program, this instruction causes a breakpoint. When not debugging the program, it usually causes some sort of trap.
Upvotes: 4