Sha256: bb85203316fc3beef7b5caf01bd78121398c7425b84221d7afc241850395074f

Contents?: true

Size: 1.15 KB

Versions: 6

Compression:

Stored size: 1.15 KB

Contents

# -*- coding: utf-8 -*-
# Copyright (C) 2010 Rocky Bernstein <rockyb@rubyforge.net>
require_relative 'disable'

# enable breakpoint command. Is like disable but the parameter
# to @proc.en_disable_breakpoint_by_number is different (set as
# ENABLE_PARM below).
class Trepan::Command::EnableCommand < Trepan::Command::DisableCommand

  # Silence already initialized constant .. warnings
  old_verbose = $VERBOSE  
  $VERBOSE    = nil
  NAME        = File.basename(__FILE__, '.rb')
  HELP        = <<-HELP
#{NAME} [display] bpnumber [bpnumber ...]
    
Enables the breakpoints given as a space separated list of breakpoint
numbers. See also "info break" to get a list.
  HELP

  ALIASES       = %w(en)
  SHORT_HELP    = 'Enable some breakpoints'
  $VERBOSE      = old_verbose 

  def initialize(proc)
    super
    @enable_parm = true # true if enable 
  end

end
        
if __FILE__ == $0
  require_relative '../mock'
  dbgr, cmd = MockDebugger::setup
  cmd.run([cmd.name])
  cmd.run([cmd.name, '1'])
  cmdproc = cmd.proc
  cmds = cmdproc.commands
  break_cmd = cmds['break']
  break_cmd.run(['break', cmdproc.frame.source_location[0].to_s])
  cmd.run([cmd.name, '1'])
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
trepanning-0.1.2 processor/command/enable.rb
trepanning-0.1.1 processor/command/enable.rb
trepanning-0.1.0 processor/command/enable.rb
trepanning-0.0.9 processor/command/enable.rb
trepanning-0.0.8 processor/command/enable.rb
trepanning-0.0.6 processor/command/enable.rb