Skip to content
Browse files

cleanup

  • Loading branch information...
1 parent da983d4 commit 250af1a9e6e999bda8040a51d08a6d525a5aff8e @mark-moseley mark-moseley committed
Showing with 5 additions and 25 deletions.
  1. +3 −20 bin/rdebug
  2. +1 −4 cli/ruby-debug.rb
  3. +1 −1 ruby-debug-cli.gemspec
View
23 bin/rdebug
@@ -124,12 +124,8 @@ def debug_program(options)
bt = Debugger.debug_load(Debugger::PROG_SCRIPT, options.stop, false)
if bt
- if options.post_mortem
- Debugger.handle_post_mortem(bt)
- else
- print bt.backtrace.map{|l| "\t#{l}"}.join("\n"), "\n"
- print "Uncaught exception: #{bt}\n"
- end
+ print bt.backtrace.map{|l| "\t#{l}"}.join("\n"), "\n"
+ print "Uncaught exception: #{bt}\n"
end
end
@@ -153,14 +149,12 @@ options = OpenStruct.new(
'client' => false,
'control' => true,
'cport' => Debugger::PORT + 1,
- 'frame_bind' => false,
'host' => nil,
'quit' => true,
'no_rewrite_program' => false,
'stop' => true,
'nx' => false,
'port' => Debugger::PORT,
- 'post_mortem' => false,
'restart_script' => nil,
'script' => nil,
'server' => false,
@@ -198,7 +192,6 @@ EOB
ENV['COLUMNS'] = '120' if ENV['COLUMNS'].to_i < 120
options.control = false
options.quit = false
- options.post_mortem = true
end
opts.on('--emacs-basic', 'Activates basic Emacs mode') do
ENV['EMACS'] = '1'
@@ -210,12 +203,6 @@ EOB
opts.on('-I', '--include PATH', String, 'Add PATH to $LOAD_PATH') do |path|
$LOAD_PATH.unshift(path)
end
- opts.on('--keep-frame-binding', 'Keep frame bindings') do
- options.frame_bind = true
- end
- opts.on('-m', '--post-mortem', 'Activate post-mortem mode') do
- options.post_mortem = true
- end
opts.on('--no-control', 'Do not automatically start control thread') do
options.control = false
end
@@ -352,12 +339,10 @@ else
# set options
Debugger.wait_connection = options.wait
- Debugger.keep_frame_binding = options.frame_bind
if options.server
# start remote mode
- Debugger.start_remote(options.host, [options.port, options.cport],
- options.post_mortem) do
+ Debugger.start_remote(options.host, [options.port, options.cport]) do
# load initrc script
Debugger.run_init_script(StringIO.new) unless options.nx
end
@@ -383,8 +368,6 @@ else
Debugger.run_script(options.script)
end
- # activate post-mortem
- Debugger.post_mortem if options.post_mortem
options.stop = false if options.tracing
Debugger.tracing = options.tracing
View
5 cli/ruby-debug.rb
@@ -44,13 +44,11 @@ def interface=(value) # :nodoc:
#
# Starts a remote debugger.
#
- def start_remote(host = nil, port = PORT, post_mortem = false)
+ def start_remote(host = nil, port = PORT)
return if @thread
- return if started?
self.interface = nil
start
- self.post_mortem if post_mortem
if port.kind_of?(Array)
cmd_port, ctrl_port = port
@@ -85,7 +83,6 @@ def start_remote(host = nil, port = PORT, post_mortem = false)
alias start_server start_remote
def start_control(host = nil, ctrl_port = PORT + 1) # :nodoc:
- raise "Debugger is not started" unless started?
return if defined?(@control_thread) && @control_thread
@control_thread = DebugThread.new do
server = TCPServer.new(host, ctrl_port)
View
2 ruby-debug-cli.gemspec
@@ -63,7 +63,7 @@ Gem::Specification.new do |s|
s.summary = %q{Command line interface (CLI) for ruby-debug-base}
s.add_dependency("columnize", ">= 0.3.1")
s.add_dependency("linecache19", ">= 0.5.11")
- s.add_dependency("ruby-debug-base19", ">= 0.11.19")
+ s.add_dependency("ruby-debug-base19", ">= 0.12.0")
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION

0 comments on commit 250af1a

Please sign in to comment.
Something went wrong with that request. Please try again.