Jason Molenda 885eae9d85 Add func call so we don't instruction-step into the builtin_trap
The way this test is structured right now, I set a breakpoint on
the instruction before the __builtin_trap.  It hits the breakpoint,
disables the breakpoint, and instruction steps.  This hits the
builtin_trap instruction which debugserver (on arm64) now advances
to the next instruction and reports that address to lldb.  lldb
doesn't recognize this as a proper response to the instruction
step and continues executing until the next trap, and the test fails.
2021-01-13 23:41:33 -08:00

13 lines
193 B
C++

#include <stdio.h>
int global = 0;
int main()
{
global = 5; // Set a breakpoint here
puts("");
__builtin_debugtrap();
global = 10;
__builtin_trap();
global = 15;
return global;
}