[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
Fri Aug 2 17:08:08 PDT 2019
jingham created this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
We failure was a little bit terse. Say whether we exited, hit another breakpoint/crashed, etc.
Repository:
rLLDB LLDB
https://reviews.llvm.org/D65682
Files:
lldb/packages/Python/lldbsuite/test/lldbutil.py
Index: lldb/packages/Python/lldbsuite/test/lldbutil.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lldbutil.py
+++ lldb/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(crashed), len(signaled)))
+
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.213146.patch
Type: text/x-patch
Size: 1133 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190803/b59f24fd/attachment-0001.bin>
More information about the lldb-commits
mailing list