app/default.rb in trepanning-0.0.9 vs app/default.rb in trepanning-0.1.0

- old
+ new

@@ -1,10 +1,8 @@ -# Copyright (C) 2010 Rocky Bernstein <rockyb@rubyforge.net> +# Copyright (C) 2010, 2011 Rocky Bernstein <rockyb@rubyforge.net> # A place for the default settings -# This could be put elsewhere but it is expected that this will grow -# get quite large. -module Trepanning +class Trepan # I am not sure if we need to sets of hashes, but we'll start out # that way. # Default settings for a Trepan class object @@ -12,20 +10,32 @@ :cmdproc_opts => {}, # Default Trepan::CmdProcessor settings :core_opts => {}, # Default Trepan::Core settings :delete_restore => true, # Delete restore profile after reading? :initial_dir => nil, # If --cd option was given, we save it here. :nx => false, # Don't run user startup file (e.g. .trepanrc) + + # Default values used only when 'server' or 'client' + # (out-of-process debugging) + :port => 1955, + :host => 'localhost', + :restart_argv => RubyVM::OS_ARGV, # Command run when "restart" is given. - :restore_profile => nil # Profile used to set/restore debugger state + :restore_profile => nil, # Profile used to set/restore debugger state + :server => false, # Out-of-process debugging? } unless defined?(DEFAULT_SETTINGS) # Default settings for Trepan run from the command line. DEFAULT_CMDLINE_SETTINGS = { :cmdfiles => [], # Initialization command files to run + :client => false, # Attach to out-of-process program? :nx => false, # Don't run user startup file (e.g. .trepanrc) :output => nil, + :port => DEFAULT_SETTINGS[:port], + :host => DEFAULT_SETTINGS[:host], + :server => false, # Out-of-process debugging? + # Note that at most one of :server or :client can be true. } unless defined?(DEFAULT_CMDLINE_SETTINGS) DEFAULT_DEBUG_STR_SETTINGS = { :core_opts => { :cmdproc_opts => {:different => false}}, @@ -47,9 +57,9 @@ end if __FILE__ == $0 # Show it: require 'pp' - PP.pp(Trepanning::DEFAULT_SETTINGS) + PP.pp(Trepan::DEFAULT_SETTINGS) puts '=' * 30 - PP.pp(Trepanning::DEFAULT_CMDLINE_SETTINGS) + PP.pp(Trepan::DEFAULT_CMDLINE_SETTINGS) end