ruby-changes:48131
From: ko1 <ko1@a...>
Date: Sat, 21 Oct 2017 18:25:03 +0900 (JST)
Subject: [ruby-changes:48131] ko1:r60245 (trunk): add RUNRUBY_USE_GDB envvar for runruby.rb.
ko1 2017-10-21 18:24:59 +0900 (Sat, 21 Oct 2017) New Revision: 60245 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60245 Log: add RUNRUBY_USE_GDB envvar for runruby.rb. * tool/runruby.rb: add RUNRUBY_USE_GDB environment variable. If RUNRUBY_USE_GDB=true then use 'gdb --args'. If there is 'run.gdb' file (made by 'make run.gdb') on current directory, run gdb with this file ('gdb -x run.gdb --args'). This envval is useful when you want to run test-all (and so on) with gdb. Modified files: trunk/tool/runruby.rb Index: tool/runruby.rb =================================================================== --- tool/runruby.rb (revision 60244) +++ tool/runruby.rb (revision 60245) @@ -106,6 +106,14 @@ end https://github.com/ruby/ruby/blob/trunk/tool/runruby.rb#L106 ENV.update env +if ENV['RUNRUBY_USE_GDB'] == 'true' + if File.exist?('run.gdb') + precommand = %w'gdb -x run.gdb --args' + else + precommand = %w'gdb --args' + end +end + cmd = [runner || ruby] cmd.concat(ARGV) cmd.unshift(*precommand) unless precommand.empty? -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/