~pali/llvm/lldb-trunk

« back to all changes in this revision

Viewing changes to lit/ExecControl/StopHook/Inputs/stop-hook-threads-2.lldbinit

  • Committer: jingham
  • Date: 2019-02-23 00:13:25 UTC
  • Revision ID: svn-v4:91177308-0d34-0410-b5e6-96231b3b80d8:lldb/trunk:354706
Make sure that stop-hooks run asynchronously.

They aren't designed to nest recursively, so this will prevent that.
Also add a --auto-continue flag, putting "continue" in the stop hook makes
the stop hooks fight one another in multi-threaded programs.
Also allow more than one -o options so you can make more complex stop hooks w/o
having to go into the editor.

<rdar://problem/48115661>

Differential Revision: https://reviews.llvm.org/D58394

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
break set -f stop-hook-threads.cpp -p "Break here to set up the stop hook"
1
2
break set -f stop-hook-threads.cpp -p "Break here to test that the stop-hook"
2
3
run
3
 
target stop-hook add -x 2 -o "frame variable thread_index"
4
 
target stop-hook add -o continue
 
4
target stop-hook add -x 2 -o "expr lldb_val += 1" -o "thread list"
 
5
target stop-hook add -G true -o "script print('Hit stop hook')