Skip to content
  • Simon Marlow's avatar
    Support the GHCi debugger with -fexternal-interpreter · 3bdf0d01
    Simon Marlow authored and Ben Gamari's avatar Ben Gamari committed
    * 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...
    3bdf0d01