1. 15 May, 2007 1 commit
    • Simon Marlow's avatar
      GHCi debugger: new flag -fbreak-on-exception · 17f848e1
      Simon Marlow authored
      When -fbreak-on-exception is set, an exception will cause GHCi to
      suspend the current computation and return to the prompt, where the
      history of the current evaluation can be inspected (if we are in
      :trace).  This isn't on by default, because the behaviour could be
      confusing: for example, ^C will cause a breakpoint.  It can be very
      useful for finding the cause of a "head []" or a "fromJust Nothing",
      though.
      17f848e1
  2. 11 May, 2007 3 commits
  3. 10 May, 2007 1 commit
  4. 09 May, 2007 2 commits
  5. 08 May, 2007 4 commits
  6. 03 May, 2007 3 commits
    • Bertram Felgenhauer's avatar
      fix exit code of ghci -e "return ()" · cbe2843a
      Bertram Felgenhauer authored
      This should result in successful program termination. Not doing this
      breaks checking the exit code of  runghc Setup.lhs build  for example.
      cbe2843a
    • Simon Marlow's avatar
      improve the :list command · 10406dfb
      Simon Marlow authored
      Now you can list source code in various ways:
        :list <line>
        :list <module> <line>
        :list <function>
      10406dfb
    • Simon Marlow's avatar
      Add history/trace functionality to the GHCi debugger · e1b89960
      Simon Marlow authored
      The debugger can now log each step of the evaluation without actually
      stopping, keeping a history of the recent steps (currently 50).  When
      a (real) breakpoint is hit, you can examine previous steps in the
      history (and their free variables) using the :history, :back and
      :forward commands.
      e1b89960
  7. 02 May, 2007 1 commit
    • Simon Marlow's avatar
      Refactoring, tidyup and improve layering · 86bec429
      Simon Marlow authored
      The stack of breakpoint resume contexts is now part of the
      InteractiveContext and managed by the GHC API.  This prevents misuse
      of the resume context by the client (e.g. resuming a breakpoint that
      isn't the topmost, which would lead to a confused IC at the least).
      
      I changed the TypeEnv in the IC to a [Id].  It only contained Ids
      anyway, and this allows us to have shadowing, which removes an ugly
      and annoying restriction.
      
      The parts of the GHC API which deal with interactive evaluation are
      now in a module of their own, InteractiveEval.
      86bec429
  8. 30 Apr, 2007 1 commit
  9. 27 Apr, 2007 2 commits
  10. 25 Apr, 2007 1 commit
  11. 20 Apr, 2007 2 commits
  12. 19 Apr, 2007 5 commits
  13. 18 Apr, 2007 8 commits
  14. 17 Apr, 2007 1 commit
    • Simon Marlow's avatar
      Re-working of the breakpoint support · cdce6477
      Simon Marlow authored
      This is the result of Bernie Pope's internship work at MSR Cambridge,
      with some subsequent improvements by me.  The main plan was to
      
       (a) Reduce the overhead for breakpoints, so we could enable 
           the feature by default without incurrent a significant penalty
       (b) Scatter more breakpoint sites throughout the code
      
      Currently we can set a breakpoint on almost any subexpression, and the
      overhead is around 1.5x slower than normal GHCi.  I hope to be able to
      get this down further and/or allow breakpoints to be turned off.
      
      This patch also fixes up :print following the recent changes to
      constructor info tables.  (most of the :print tests now pass)
      
      We now support single-stepping, which just enables all breakpoints.
      
        :step <expr>     executes <expr> with single-stepping turned on
        :step            single-steps from the current breakpoint
      
      The mechanism is quite different to the previous implementation.  We
      share code with the HPC (haskell program coverage) implementation now.
      The coverage pass annotates source code with "tick" locations which
      are tracked by the coverage tool.  In GHCi, each "tick" becomes a
      potential breakpoint location.
      
      Previously breakpoints were compiled into code that magically invoked
      a nested instance of GHCi.  Now, a breakpoint causes the current
      thread to block and control is returned to GHCi.
      
      See the wiki page for more details and the current ToDo list:
      
        http://hackage.haskell.org/trac/ghc/wiki/NewGhciDebugger
      cdce6477
  15. 27 Mar, 2007 1 commit
  16. 16 Feb, 2007 1 commit
  17. 14 Feb, 2007 1 commit
  18. 21 Jan, 2007 1 commit
    • mnislaih's avatar
      Refactoring of Debugger.hs · 01314483
      mnislaih authored
      A big motivation to start with it was getting several independently useful functions out of the Ghci monad and into the IO monad instead. Working in debugger integration for Emacs via the ghc-api is helping me to improve reusability..
            While I was there, I tried to make the code less tangled, easier to understand, switched from implicit Exceptions to explicit Eithers in the bkptTable code, etc.
      01314483
  19. 12 Jan, 2007 1 commit