Sha256: 04103081fbcf9b52edabfbda39a6622f0ae9772a32ec30acd4a531c302ad51b2
Contents?: true
Size: 1.18 KB
Versions: 2
Compression:
Stored size: 1.18 KB
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) HELP = 'Show the value of the VM dynamic frame pointer (DFP)' MIN_ABBREV = 'lf'.size NAME = File.basename(__FILE__, '.rb') NEED_STACK = true PREFIX = %w(info registers dfp) end include Registers def run(args) register_array_index(PREFIX[-1], args) end end if __FILE__ == $0 # Demo it. require_relative '../../../mock' require_relative '../../../subcmd' name = File.basename(__FILE__, '.rb') # FIXME: DRY the below code dbgr, info_cmd = MockDebugger::setup('info') testcmdMgr = Trepan::Subcmd.new(info_cmd) cmd_name = Trepan::SubSubcommand::InfoRegistersDfp::PREFIX.join('') infox_cmd = Trepan::SubSubcommand::InfoRegistersDfp.new(info_cmd.proc, info_cmd, cmd_name) infox_cmd.run([]) # name = File.basename(__FILE__, '.rb') # subcommand.summary_help(name) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
trepanning-0.0.6 | processor/command/info_subcmd/registers_subcmd/dfp.rb |
trepanning-0.0.4 | processor/command/info_subcmd/registers_subcmd/dfp.rb |