brkpt
Breakpoint trap (interrupt 3)
Raises interrupt 3, the breakpoint trap, using the one-byte encoding that debuggers insert.
8086 and later
CFPFAFZFSFTFIFDFOF –––––0●––
- ● set from the result
- 0 always 0
- – not changed
Forms
brkpt
Unlike int 3, it is not subject to the virtual-8086 IOPL check or to interrupt redirection. Under Linux, a program that executes it receives SIGTRAP.
global _start
section .text
_start:
mov rax, 12
mov rbx, 5
mov rcx, 3
mov rsi, 9
brkpt
mov rax, 60 ; syscall 60: exit
xor rdi, rdi
syscall