提交 1c96680c 编写于 作者: A Alessandro Arzilli 提交者: Derek Parker

Documentation: add another starlark example script (#1731)

This script re-runs a program until it fails or hits a breakpoint, it
is useful for debugging non-deterministic problems when used in
conjunction with rr.
上级 ccf57b94
......@@ -292,3 +292,18 @@ Example use (find the first element of slice 's2' with field A equal to 5):
print("not found")
```
## Rerunning a program until it fails or hits a breakpoint
```
def command_flaky(args):
"Continues and restarts the target program repeatedly (re-recording it on the rr backend), until a breakpoint is hit"
count = 1
while True:
if dlv_command("continue") == None:
break
print("restarting", count, "...")
count = count+1
restart(Rerecord=True)
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册