Sha256: d2bb0369373c9b4a367b4a6d61f1150ac1f22da0a345778cae359d95c97a3275

Contents?: true

Size: 1.03 KB

Versions: 7

Compression:

Stored size: 1.03 KB

Contents

# -*- coding: utf-8 -*-
# Copyright (C) 2010, 2011 Rocky Bernstein <rockyb@rubyforge.net>
require 'rubygems'; require 'require_relative'
require_relative '../command'
class Trepan::Command::PrCommand < Trepan::Command

  unless defined?(HELP)
    NAME = File.basename(__FILE__, '.rb')
    HELP = 
      "#{NAME} EXPRESSION

Print the value of the EXPRESSION. Variables accessible are those of the
environment of the selected stack frame, plus globals. 

If the length output string large, the first part of the value is
shown and ... indicates it has been truncated.

See 'set max string' to change the string truncation limit.
"

    # ALIASES       = %w(p)
    CATEGORY      = 'data'
    SHORT_HELP    = 'print expression truncating long output'
  end
  
  def run(args)
    msg @proc.debug_eval(@proc.cmd_argstr, settings[:maxstring])
  end
end
        
if __FILE__ == $0
  require_relative '../mock'
  dbgr, cmd = MockDebugger::setup
  arg_str = '1 + 2'
  cmd.proc.instance_variable_set('@cmd_argstr', arg_str)
  cmd.run([cmd.name, arg_str])
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
rbx-trepanning-0.2.1-universal-rubinius-2.0 processor/command/pr.rb
rbx-trepanning-0.2.1-universal-rubinius-1.2 processor/command/pr.rb
rbx-trepanning-0.2.0-universal-rubinius-2.0 processor/command/pr.rb
rb8-trepanning-0.1.6 processor/command/pr.rb
rb8-trepanning-0.1.5 processor/command/pr.rb
rbx-trepanning-0.1.0-universal-rubinius-1.2 processor/command/pr.rb
rb8-trepanning-0.1.4 processor/command/pr.rb