summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
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?