[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
Tue Feb 19 10:55:26 PST 2019


jingham created this revision.
jingham added reviewers: labath, jgorbe.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Auto-continuing a stop hook by adding a "continue" command to the hook didn't work very well for multi-threaded programs.  The first hook in kept all the others from running, so the behavior was unpredictable.

Also,  the stop hooks were running in synchronous mode, which meant that 'continue' in a stop hook would start nesting hook execution, which they were not designed to do.

This patch forces Async execution for the stop-hooks, and adds an auto-continue flag.

I also made it possible to add more than one command at a time to the stop hook by repeating the -o command.  I can't remember why I thought it was a good idea originally to have only ONE --one-liner option here & in breakpoint commands, etc.  It's really convenient to be able to build these on a single line.

Also fixed up a few tests.  The plain stop-hook tests were failing for me, even though I didn't change any relevant output.  Adding the 'interpreter.echo-comment-commands false' made them start passing again...

I didn't uncomment the UNSUPPORTED on Linux for stop-hook-threads.test,  I'd appreciate somebody giving this a whirl there first to see if this works now.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D58394

Files:
  include/lldb/Target/Process.h
  include/lldb/Target/Target.h
  lit/ExecControl/StopHook/Inputs/stop-hook-1.lldbinit
  lit/ExecControl/StopHook/Inputs/stop-hook-2.lldbinit
  lit/ExecControl/StopHook/Inputs/stop-hook-3.lldbinit
  lit/ExecControl/StopHook/Inputs/stop-hook-threads-1.lldbinit
  lit/ExecControl/StopHook/Inputs/stop-hook-threads-2.lldbinit
  lit/ExecControl/StopHook/Inputs/stop-hook-threads.cpp
  lit/ExecControl/StopHook/stop-hook-threads.test
  source/Commands/CommandObjectTarget.cpp
  source/Target/Process.cpp
  source/Target/Target.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58394.187410.patch
Type: text/x-patch
Size: 15637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190219/78b6f60d/attachment-0001.bin>


More information about the lldb-commits mailing list