Sha256: f9d37f955314b3cd24ecae7aecb515067d42c1efeb6a944dc93e6f7409794f12

Contents?: true

Size: 1.21 KB

Versions: 12

Compression:

Stored size: 1.21 KB

Contents

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

class Trepan::SubSubcommand::ShowAutoDis < Trepan::ShowBoolSubSubcommand
  unless defined?(HELP)
    HELP = "Show running a 'dis' command each time we enter the debugger"
    MIN_ABBREV   = 'l'.size
    NAME         = File.basename(__FILE__, '.rb')
    PREFIX       = %w(show auto dis)
  end

end

if __FILE__ == $0
  # Demo it.
  require_relative '../../../mock'
  require_relative '../../../subcmd'

  # FIXME: DRY the below code

  dbgr, show_cmd = MockDebugger::setup('show', false)
  testcmdMgr     = Trepan::Subcmd.new(show_cmd)
  auto_cmd       = Trepan::SubSubcommand::ShowAuto.new(dbgr.processor, 
                                                       show_cmd)

  # FIXME: remove the 'join' below
  cmd_name       = Trepan::SubSubcommand::ShowAutoDis::PREFIX.join('')
  autox_cmd      = Trepan::SubSubcommand::ShowAutoDis.new(show_cmd.proc, auto_cmd,
                                                           cmd_name)
  # require_relative '../../../../lib/trepanning'
  # dbgr = Trepan.new(:set_restart => true)
  # dbgr.debugger
  autox_cmd.run([])

end

Version data entries

12 entries across 12 versions & 1 rubygems

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