delve/_fixtures/nopbreakpoint/main.s
Alessandro Arzilli f1a5e654ff proc: fix breakpoint confusion on resume (#1738)
Fixes a case of breakpoint confusion on resume caused by having two
breakpoints one byte apart. This bug can cause the target program to
resume execution a single byte inside an instruction and crash either
with SIGILL or a SIGSEGV, or misbehave (depending on how the truncated
instruction is decoded).

native.(*Thread).StepInstruction should call FindBreakpoint using
adjustPC==false because at that point the PC of the thread should
already have been adjusted (and it has been).
2019-10-28 14:55:32 -07:00

7 lines
168 B
ArmAsm

#include "textflag.h"
TEXT ·compromised(SB),NOSPLIT,$0-0
BYTE $0x90 // The assembler strips NOP, this is a hardcoded NOP instruction
CALL main·skipped(SB)
RET