Sha256: 9bca999afae72f931ebf8a745e3a44a41c5b61eba7e8489d8aa02fc086301fc3

Contents?: true

Size: 1 KB

Versions: 12

Compression:

Stored size: 1 KB

Contents

# -*- coding: utf-8 -*-
# Copyright (C) 2010 Rocky Bernstein <rockyb@rubyforge.net>
require 'rubygems'; require 'require_relative'
require_relative '../../base/subsubcmd'

class Trepan::Subcommand::SetAutoDis < Trepan::SetBoolSubSubcommand
  unless defined?(HELP)
    HELP = "Set to run a 'disassemble' command each time we enter the debugger"
    MIN_ABBREV = 'd'.size
    NAME       = File.basename(__FILE__, '.rb')
    PREFIX     = %W(set auto #{NAME})
    SHORT_HELP = "Set running a 'disassemble' command each time we enter the debugger"
  end

  def run(args)
    super
    if @proc.settings[:autodis]
      @proc.cmdloop_prehooks.insert_if_new(10, *@proc.autodis_hook)
    else
      @proc.cmdloop_prehooks.delete_by_name('autodis')
    end
  end

end

if __FILE__ == $0
  # Demo it.
  require_relative '../../../mock'
  require_relative '../auto'
  cmd = MockDebugger::subsub_setup(Trepan::SubSubcommand::SetAuto,
                                   Trepan::SubSubcommand::SetAutoDis)
  cmd.run([cmd.name, 'off'])
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rbx-trepanning-0.2.1-universal-rubinius-2.0 processor/command/set_subcmd/auto_subcmd/dis.rb
rbx-trepanning-0.2.1-universal-rubinius-1.2 processor/command/set_subcmd/auto_subcmd/dis.rb
rbx-trepanning-0.2.0-universal-rubinius-2.0 processor/command/set_subcmd/auto_subcmd/dis.rb
rbx-trepanning-0.1.0-universal-rubinius-1.2 processor/command/set_subcmd/auto_subcmd/dis.rb
rbx-trepanning-0.0.8-universal-rubinius-1.2 processor/command/set_subcmd/auto_subcmd/dis.rb
rbx-trepanning-0.0.7-universal-rubinius-1.2 processor/command/set_subcmd/auto_subcmd/dis.rb
rbx-trepanning-0.0.6-universal-rubinius-1.2 processor/command/set_subcmd/auto_subcmd/dis.rb
rbx-trepanning-0.0.5-universal-rubinius-1.2.1 processor/command/set_subcmd/auto_subcmd/dis.rb
rbx-trepanning-0.0.4-universal-rubinius-1.2 processor/command/set_subcmd/auto_subcmd/dis.rb
rbx-trepanning-0.0.3-universal-rubinius-1.2 processor/command/set_subcmd/auto_subcmd/dis.rb
rbx-trepanning-0.0.2-universal-rubinius-1.2 processor/command/set_subcmd/auto_subcmd/dis.rb
rbx-trepanning-0.0.1-universal-rubinius processor/command/set_subcmd/auto_subcmd/dis.rb