Skip to content
  • Roland Senn's avatar
    Add disable/enable commands to ghci debugger #2215 · 10452959
    Roland Senn authored and Marge Bot's avatar Marge Bot committed
    This patch adds two new commands `:enable` and `:disable` to the GHCi debugger.
    Opposite to `:set stop <n> :continue` a breakpoint disabled with `:disable` will
    not loose its previously set stop command.
    A new field breakEnabled is added to the BreakLocation data structure to
    track the enable/disable state. When a breakpoint is disabled with a `:disable`
    command, the following happens:
    
    The corresponding BreakLocation data element is searched dictionary of the
    `breaks` field of the GHCiStateMonad. If the break point is found and not
    already in the disabled state, the breakpoint is removed from bytecode.
    The BreakLocation data structure is kept in the breaks list and the new
    breakEnabled field is set to false.
    
    The `:enable` command works similar.
    
    The breaks field in the GHCiStateMonad was changed from an association list
    to int `IntMap`.
    10452959