diff options
author | Roland Senn <rsx@bluewin.ch> | 2019-11-11 11:56:59 +0100 |
---|---|---|
committer | Roland Senn <rsx@bluewin.ch> | 2020-02-29 17:36:59 +0100 |
commit | 3979485bd97771373214c44d14b7830ba447ad23 (patch) | |
tree | b596caf792f542f563b20d0a30746e9b89b4d95f /testsuite/tests/ghci.debugger/scripts/all.T | |
parent | 04d30137771a6cf8a18fda1ced25f78d0b2eb204 (diff) | |
download | haskell-3979485bd97771373214c44d14b7830ba447ad23.tar.gz |
Show breakpoint locations of breakpoints which were ignored during :force (#2950)
GHCi is split up into 2 major parts: The user-interface (UI)
and the byte-code interpreter. With `-fexternal-interpreter`
they even run in different processes. Communication between
the UI and the Interpreter (called `iserv`) is done using
messages over a pipe. This is called `Remote GHCI` and
explained in the Note [Remote GHCi] in `compiler/ghci/GHCi.hs`.
To process a `:force` command the UI sends a `Seq` message
to the `iserv` process. Then `iserv` does the effective
evaluation of the value. When during this process a breakpoint
is hit, the `iserv` process has no additional information to
enhance the `Ignoring breakpoint` output with the breakpoint
location.
To be able to print additional breakpoint information,
there are 2 possible implementation choices:
1. Store the needed information in the `iserv` process.
2. Print the `Ignoring breakpoint` from the UI process.
For option 1 we need to store the breakpoint info redundantely
in 2 places and this is bad. Therfore option 2 was implemented
in this MR:
- The user enters a `force` command
- The UI sends a `Seq` message to the `iserv` process.
- If processing of the `Seq` message hits a breakpoint,
the `iserv` process returns control to the UI process.
- The UI looks up the source location of the breakpoint,
and prints the enhanced `Ignoring breakpoint` output.
- The UI sends a `ResumeSeq` message to the `iserv` process,
to continue forcing.
Diffstat (limited to 'testsuite/tests/ghci.debugger/scripts/all.T')
-rw-r--r-- | testsuite/tests/ghci.debugger/scripts/all.T | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T index d38b3681ad..24939a942e 100644 --- a/testsuite/tests/ghci.debugger/scripts/all.T +++ b/testsuite/tests/ghci.debugger/scripts/all.T @@ -107,6 +107,7 @@ test('hist002', [extra_files(['../Test3.hs']), extra_run_opts('+RTS -I0')], test('T1620', extra_files(['T1620/', 'T1620/T1620.hs']), ghci_script, ['T1620.script']) test('T2740', normal, ghci_script, ['T2740.script']) +test('T2950', normal, ghci_script, ['T2950.script']) test('getargs', extra_files(['../getargs.hs']), ghci_script, ['getargs.script']) test('T7386', normal, ghci_script, ['T7386.script']) |