From 293b9d66af15b2f14f2e278a32a5aa29b7c396d1 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sat, 21 Oct 2017 09:24:59 +0000 Subject: 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/runruby.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tool/runruby.rb') diff --git a/tool/runruby.rb b/tool/runruby.rb index 20f37487a9..cdbc1c0765 100755 --- a/tool/runruby.rb +++ b/tool/runruby.rb @@ -106,6 +106,14 @@ end 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? -- cgit v1.2.1