[Lldb-commits] [PATCH] D18886: Reset continue_after_async only if neither SIGINIT nor SIGSTOP received

Oleksiy Vyalov via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 8 12:15:47 PDT 2016

ovyalov added a comment.

In http://reviews.llvm.org/D18886#395216, @labath wrote:

> Does this fix an existing test or is a new issue? If it's new (it sounds like it is, as I don't see any test failures), could you also add a test for this. It shouldn't be too difficult to write one... Would something like this:
>   dbg.SetAsync(true)
>   process.Continue()
>   lldbutil.expect_state_changes(self,dbg.GetListener(), [eStateRunning])
>   target.BreakpointCreateBySourceRegex("// some code which will not get executed by the inferior")
>   do_some_assertions_on_the_breakpoint()
>   while dbg.GetListener().WaitForEvent(2, event):
>     if SBProcess.GetStateFromEvent(event) == eStateStopped and SBProcess.GetRestartedFromEvent(state):
>       continue
>     if SBProcess.GetStateFromEvent(event) == eStateRunning:
>       continue
>     self.fail("Setting a breakpoint generated an unexpected event: %s"%SBDebugger.StateAsCString(SBProcess.GetStateFromEvent(event)));
> do the trick?

Thanks for suggested test, Pavel.


More information about the lldb-commits mailing list