diff options
Diffstat (limited to 'testsuite/tests/ghci.debugger/scripts/break022')
8 files changed, 52 insertions, 0 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/break022/A.hs b/testsuite/tests/ghci.debugger/scripts/break022/A.hs new file mode 100644 index 0000000000..bf903ab11e --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break022/A.hs @@ -0,0 +1,4 @@ +module A where +import {-# SOURCE #-} B + +a x = b x
\ No newline at end of file diff --git a/testsuite/tests/ghci.debugger/scripts/break022/B.hs b/testsuite/tests/ghci.debugger/scripts/break022/B.hs new file mode 100644 index 0000000000..cfc9682cbd --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break022/B.hs @@ -0,0 +1,5 @@ +module B where + +import A + +b x = x
\ No newline at end of file diff --git a/testsuite/tests/ghci.debugger/scripts/break022/B.hs-boot b/testsuite/tests/ghci.debugger/scripts/break022/B.hs-boot new file mode 100644 index 0000000000..8e73321e9f --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break022/B.hs-boot @@ -0,0 +1,3 @@ +module B where + +b :: a -> a
\ No newline at end of file diff --git a/testsuite/tests/ghci.debugger/scripts/break022/C.hs b/testsuite/tests/ghci.debugger/scripts/break022/C.hs new file mode 100644 index 0000000000..0dd15af7e7 --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break022/C.hs @@ -0,0 +1,5 @@ +module C where + +import A +import B + diff --git a/testsuite/tests/ghci.debugger/scripts/break022/Makefile b/testsuite/tests/ghci.debugger/scripts/break022/Makefile new file mode 100644 index 0000000000..1c39d1c1fe --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break022/Makefile @@ -0,0 +1,3 @@ +TOP=../../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghci.debugger/scripts/break022/all.T b/testsuite/tests/ghci.debugger/scripts/break022/all.T new file mode 100644 index 0000000000..f81e8de45c --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break022/all.T @@ -0,0 +1,4 @@ +setTestOpts(extra_run_opts('-ignore-dot-ghci')) +setTestOpts(if_compiler_profiled(skip)) + +test('break022', normal, ghci_script, ['break022.script']) diff --git a/testsuite/tests/ghci.debugger/scripts/break022/break022.script b/testsuite/tests/ghci.debugger/scripts/break022/break022.script new file mode 100644 index 0000000000..e0aaeda371 --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break022/break022.script @@ -0,0 +1,20 @@ + +-- We have this structure of modules: + +-- A (imports B.boot) +-- B (imports A) +-- B.boot (imports A) +-- C (imports A and B) + +-- And we load C, to debug some function in A which enters B. +-- But first we touch A, and reload. B.boot will be reloaded, but not B, which will end up with an empty modbreaks. When we :step into B, ghci will die with an out of bounds access in B's break array. +-- The effect we want is B.boot being reloaded while B is not. + +:l C +:! touch A.hs +:r +:break a +a () +:st +:st +:st -- here we step into B, and produce the exception
\ No newline at end of file diff --git a/testsuite/tests/ghci.debugger/scripts/break022/break022.stdout b/testsuite/tests/ghci.debugger/scripts/break022/break022.stdout new file mode 100644 index 0000000000..49cbd2628d --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break022/break022.stdout @@ -0,0 +1,8 @@ +Breakpoint 0 activated at A.hs:4:1-9 +Stopped at A.hs:4:1-9 +_result :: a = _ +Stopped at A.hs:4:7-9 +_result :: () = _ +x :: () = () +Stopped at B.hs:5:1-7 +_result :: t = _ |