summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 09:24:59 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 09:24:59 +0000
commit293b9d66af15b2f14f2e278a32a5aa29b7c396d1 (patch)
treea417d5e8bd82b4742dbb2019400afa1ee07a6885 /tool
parent719531dba564368add7c66b228c557b6bc2ae51d (diff)
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
Diffstat (limited to 'tool')
-rwxr-xr-xtool/runruby.rb8
1 files changed, 8 insertions, 0 deletions
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?