Sha256: 11e3a6fa2962ddf667fb8d88a7703e2d8ebe6bfc027f79554642fde4e0771dcc

Contents?: true

Size: 843 Bytes

Versions: 3

Compression:

Stored size: 843 Bytes

Contents

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

class Trepan::Subcommand::InfoRegistersDfp < Trepan::SubSubcommand
  unless defined?(HELP)
    Trepanning::SubSubcommand.set_name_prefix(__FILE__, self)
    HELP         = 'Show the value of the VM dynamic frame pointer (DFP)'
    MIN_ABBREV   = 'df'.size
    NEED_STACK   = true
  end

  include Registers
  def run(args)
    register_array_index(PREFIX[-1], args[0])
  end
end

if __FILE__ == $0
  # Demo it.
  require_relative '../../../mock'
  require_relative '../registers'
  cmd = MockDebugger::subsub_setup(Trepan::SubSubcommand::InfoRegisters,
                                   Trepan::SubSubcommand::InfoRegistersDfp,
                                   false)
  cmd.run(['0'])
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
trepanning-0.1.6 processor/command/info_subcmd/registers_subcmd/dfp.rb
trepanning-0.1.4 processor/command/info_subcmd/registers_subcmd/dfp.rb
trepanning-0.1.3 processor/command/info_subcmd/registers_subcmd/dfp.rb