Skip to content

Add disable/enable commands to ghci debugger #2215

Roland Senn requested to merge RolandSenn/ghc:T2215 into master

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 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.

Edited by Roland Senn

Merge request reports