summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Molenda <jason@molenda.com>2021-01-13 23:39:32 -0800
committerJason Molenda <jason@molenda.com>2021-01-13 23:41:33 -0800
commit885eae9d85de4b1b1907ac9b3ecba26565932069 (patch)
tree4743b3890247d5d4fdac442d34fea51a6b48c989
parentff5e896425577f445ed080d88b582aab0896fba0 (diff)
downloadllvm-885eae9d85de4b1b1907ac9b3ecba26565932069.tar.gz
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.
-rw-r--r--lldb/test/API/macosx/builtin-debugtrap/main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/test/API/macosx/builtin-debugtrap/main.cpp b/lldb/test/API/macosx/builtin-debugtrap/main.cpp
index 2cbe2a48b503..84332d800148 100644
--- a/lldb/test/API/macosx/builtin-debugtrap/main.cpp
+++ b/lldb/test/API/macosx/builtin-debugtrap/main.cpp
@@ -3,6 +3,7 @@ int global = 0;
int main()
{
global = 5; // Set a breakpoint here
+ puts("");
__builtin_debugtrap();
global = 10;
__builtin_trap();