[commit: ghc] master: Support the GHCi debugger with -fexternal-interpreter (3bdf0d0)

git at git.haskell.org git at git.haskell.org
Tue Jul 17 00:47:40 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3bdf0d01ff47977830ada30ce85f174098486e23/ghc

>---------------------------------------------------------------

commit 3bdf0d01ff47977830ada30ce85f174098486e23
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Mon Jul 16 19:58:31 2018 -0400

    Support the GHCi debugger with -fexternal-interpreter
    
    * All the tests in tests/ghci.debugger now pass with
      -fexternal-interpreter. These tests are now run with the ghci-ext way
      in addition to the normal way so we won't break it in the future.
    
    * I removed all the unsafeCoerce# calls from RtClosureInspect. Yay!
    
    The main changes are:
    
    * New messages: GetClosure and Seq.  GetClosure is a remote interface to
      GHC.Exts.Heap.getClosureData, which required Binary instances for
      various datatypes. Fortunately this wasn't too painful thanks to
      DeriveGeneric.
    
    * No cheating by unsafeCoercing values when printing them. Now we have
      to turn the Closure representation back into the native representation
      when printing Int, Float, Double, Integer and Char. Of these, Integer
      was the most painful - we now have a dependency on integer-gmp due to
      needing access to the representation.
    
    * Fixed a bug in rts/Heap.c - it was bogusly returning stack content as
      pointers for an AP_STACK closure.
    
    Test Plan:
    * `cd testsuite/tests/ghci.debugger && make`
    * validate
    
    Reviewers: bgamari, patrickdoc, nomeata, angerman, hvr, erikd, goldfire
    
    Subscribers: alpmestan, snowleopard, rwbarton, thomie, carter
    
    GHC Trac Issues: #13184
    
    Differential Revision: https://phabricator.haskell.org/D4955


>---------------------------------------------------------------

3bdf0d01ff47977830ada30ce85f174098486e23
 compiler/ghc.cabal.in                              |  10 ++
 compiler/ghci/Debugger.hs                          |  18 +--
 compiler/ghci/GHCi.hs                              |  14 ++
 compiler/ghci/RtClosureInspect.hs                  | 178 +++++++++++++++------
 compiler/main/InteractiveEval.hs                   |  14 +-
 ghc.mk                                             |   1 +
 libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs   |   5 +-
 libraries/ghc-heap/GHC/Exts/Heap/Closures.hs       |   9 +-
 .../ghc-heap/GHC/Exts/Heap/InfoTable/Types.hsc     |   4 +-
 libraries/ghci/GHCi/Message.hs                     |  35 +++-
 libraries/ghci/GHCi/Run.hs                         |   7 +-
 libraries/integer-gmp/src/GHC/Integer/Type.hs      |   5 +
 rts/Heap.c                                         |  11 +-
 testsuite/tests/ghci.debugger/scripts/all.T        |   8 +-
 14 files changed, 241 insertions(+), 78 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 3bdf0d01ff47977830ada30ce85f174098486e23


More information about the ghc-commits mailing list