[Lldb-commits] [PATCH] D58394: Add --auto-continue to stop-hooks, fix up a few tests

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 20 10:37:02 PST 2019


jingham marked 2 inline comments as done.
jingham added a comment.

Pavel, I think the new behavior w.r.t. launching is better.  When the process plugins are managing events to handle a launch or attach, they really don't want random stop hooks getting in their way.  On MacOS, if you set a stop hook before launch you always got one stop message at a place you didn't cause the target to stop, which I think was just confusing.



================
Comment at: lit/ExecControl/StopHook/stop-hook-threads.test:36
 # When we don't filter, we expect to count 12 stopped threads in the thread list output
-# CHECK-NO-FILTER-COUNT-12: at stop-hook-threads.cpp{{.*}} stop reason = breakpoint
\ No newline at end of file
+# CHECK-NO-FILTER-COUNT-12: , stop reason = breakpoint 3.1
----------------
labath wrote:
> BTW, this check is fairly dodgy, because in the case of two threads hitting a breakpoint simultaneously, we will get 4 stop reasons instead of two ("thread list" will be executed twice, and each instance will print the stop reason for both threads). It might be better to replace "thread list" with a different command, or add synchronization to the test to prevent two threads from hitting the breakpoint at once, depending on what we want to test.
Yes, trying to make a good test scraping thread list output is no good.  Instead I made the stop-hook set a variable in the target.  Then we can just check that value to see if we hit and ran the stop hooks the right number of times.


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D58394





More information about the lldb-commits mailing list