зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
719531dba5
Коммит
293b9d66af
|
@ -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?
|
||||
|
|
Загрузка…
Ссылка в новой задаче