diff options
Diffstat (limited to 'testsuite/tests/ghci.debugger/scripts/break016.script')
-rw-r--r-- | testsuite/tests/ghci.debugger/scripts/break016.script | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/break016.script b/testsuite/tests/ghci.debugger/scripts/break016.script new file mode 100644 index 0000000000..2124e045bd --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break016.script @@ -0,0 +1,11 @@ +-- conditional breakpoints +:l break016.hs +:break 1 7 +-- this is one way to do conditional breakpoints. It's a bit +-- horrible: the :undef will complain the first time it is used. +:def cond (\expr -> return (":undef __cond\n:def __cond (\\_ -> if "++expr++" then return \"\" else return \":cont\")\n:__cond")) +:set stop 0 :cond (i < 3) +-- this one continues: +f 4 +-- this one stops: +f 1 |