Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 llvm-svn: 354706
- Loading branch information
Showing
12 changed files
with
99 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
target stop-hook add -f stop-hook.c -l 29 -e 34 -o "expr ptr" | ||
target stop-hook add -f stop-hook.c -l 29 -e 34 -o "expr ptr" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
target stop-hook add -f stop-hook.c -l 29 -e 34 | ||
expr ptr | ||
DONE | ||
DONE |
6 changes: 3 additions & 3 deletions
6
lldb/lit/ExecControl/StopHook/Inputs/stop-hook-threads-1.lldbinit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
break set -f stop-hook-threads.cpp -p "Break here to set up the stop hook" | ||
break set -f stop-hook-threads.cpp -p "Break here to test that the stop-hook" | ||
run | ||
target stop-hook add | ||
frame variable --show-globals g_val | ||
target stop-hook add -G true | ||
expr lldb_val += 1 | ||
thread list | ||
continue | ||
DONE |
5 changes: 3 additions & 2 deletions
5
lldb/lit/ExecControl/StopHook/Inputs/stop-hook-threads-2.lldbinit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
break set -f stop-hook-threads.cpp -p "Break here to set up the stop hook" | ||
break set -f stop-hook-threads.cpp -p "Break here to test that the stop-hook" | ||
run | ||
target stop-hook add -x 2 -o "frame variable thread_index" | ||
target stop-hook add -o continue | ||
target stop-hook add -x 2 -o "expr lldb_val += 1" -o "thread list" | ||
target stop-hook add -G true -o "script print('Hit stop hook') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters