[Lldb-commits] [lldb] 885eae9 - Add func call so we don't instruction-step into the builtin_trap

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 13 23:41:45 PST 2021


Author: Jason Molenda
Date: 2021-01-13T23:41:33-08:00
New Revision: 885eae9d85de4b1b1907ac9b3ecba26565932069

URL: https://github.com/llvm/llvm-project/commit/885eae9d85de4b1b1907ac9b3ecba26565932069
DIFF: https://github.com/llvm/llvm-project/commit/885eae9d85de4b1b1907ac9b3ecba26565932069.diff

LOG: 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.

Added: 
    

Modified: 
    lldb/test/API/macosx/builtin-debugtrap/main.cpp

Removed: 
    


################################################################################
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();


        


More information about the lldb-commits mailing list