Add disable/enable commands to ghci debugger #2215
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 in the list of thebreaks
field of theGHCiStateMonad
. - 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 thebreaks
list and the newbreakEnabled
field is set to false.
The :enable
command works similar.