-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#107: Debugger "watchpoints": breakpoints that trigger when a command…
… executed matches a particular regex.
- Loading branch information
Showing
17 changed files
with
291 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
# Run as ./make -f debug-test/Makefile -X --debugger-stop=preaction, | ||
# then do `watch Hell.`. | ||
|
||
UNEXPANDED=expanded | ||
|
||
all: test | ||
echo "$(UNEXPANDED) all done!" | ||
|
||
test: | ||
echo "$(UNEXPANDED) Hello" | ||
echo "$(UNEXPANDED) Goodbye" |
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 |
---|---|---|
|
@@ -37,4 +37,4 @@ Examples: | |
|
||
.. seealso:: | ||
|
||
:ref:`delete <delete>`. | ||
:ref:`delete <delete>`, :ref:`watch <watch>`. |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.. index:: watch | ||
.. _watch: | ||
|
||
Add a command watchpoint (`watch`) | ||
------------------------------------- | ||
|
||
**watch** *regex* | ||
|
||
Add a "command watch" breakpoint that triggers before a command that is about to be executed matches the given regex. | ||
An argument is the regex. | ||
|
||
Example: | ||
++++++++ | ||
|
||
:: | ||
|
||
# 'watch' if something tries to delete "precious" directory | ||
watch rm -[rf] precious | ||
# Alternative regex | ||
watch \brm\b.+precious | ||
|
||
.. seealso:: | ||
|
||
:ref:`delete <delete>`, :ref:`break <break>`. |
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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** \file libdebugger/command/help/watch.h | ||
* | ||
* \brief Help text for debugger command `watch`. | ||
* | ||
*/ | ||
#define watch_HELP_TEXT \ | ||
"Add a \"command watch\" breakpoint that triggers when a command is about to be executed matches the given regex.\n" \ | ||
"An argument is the regex." |
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
Oops, something went wrong.