Sha256: 5269e6d6f26de97a3516e6607c4737d94977f870d13ab88f7c0a4bc07fc9d051
Contents?: true
Size: 763 Bytes
Versions: 43
Compression:
Stored size: 763 Bytes
Contents
module Debugger # Implements debugger "source" command. class SourceCommand < Command self.allow_in_control = true def regexp /^\s* so(?:urce)? \s+ (.+) $/x end def execute file = File.expand_path(@match[1]).strip unless File.exist?(file) errmsg "Command file '#{file}' is not found\n" return end if @state and @state.interface @state.interface.command_queue += File.open(file).readlines else Debugger.run_script(file, @state) end end class << self def help_command 'source' end def help(cmd) %{ source FILE\texecutes a file containing debugger commands } end end end end
Version data entries
43 entries across 43 versions & 10 rubygems