[Lldb-commits] [PATCH] D65682: Give a little more info when "run_to_x_breakpoint" fails

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 13 10:07:13 PDT 2019


jingham updated this revision to Diff 214865.
jingham added a comment.

Fixed the inverted call order.


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65682/new/

https://reviews.llvm.org/D65682

Files:
  packages/Python/lldbsuite/test/lldbutil.py


Index: packages/Python/lldbsuite/test/lldbutil.py
===================================================================
--- packages/Python/lldbsuite/test/lldbutil.py
+++ packages/Python/lldbsuite/test/lldbutil.py
@@ -778,7 +778,18 @@
     threads = get_threads_stopped_at_breakpoint(
                 process, bkpt)
 
+    # Check that we stopped at our breakpoint.  Try to separate failure reasons:
+    test.assertNotEqual(process.GetState(), lldb.eStateExited, "Process exited before stopping at breakpoint.")
+    if len(threads) == 0:
+        (bkpts, crashed, signaled) = ([], [], [])
+        sort_stopped_threads(process, 
+                             breakpoint_threads = bkpts, 
+                             crashed_threads = crashed, 
+                             signal_threads = signaled)
+        test.fail("Stopped for another reason: Breakpoint: %d Signaled: %d Crashed: %d"%(len(bkpts), len(signaled), len(crashed)))
+
     test.assertTrue(len(threads) == 1, "Expected 1 thread to stop at breakpoint, %d did."%(len(threads)))
+
     thread = threads[0]
     return (target, process, thread, bkpt)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65682.214865.patch
Type: text/x-patch
Size: 1118 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190813/91c5df7c/attachment-0001.bin>


More information about the lldb-commits mailing list