[前][次][番号順一覧][スレッド一覧]

ruby-changes:56011

From: Nobuyoshi <ko1@a...>
Date: Wed, 5 Jun 2019 11:15:29 +0900 (JST)
Subject: [ruby-changes:56011] Nobuyoshi Nakada: a105831819 (trunk): tool/runruby.rb: support RUNRUBY_USE_LLDB as well as RUNRUBY_USE_GDB

https://git.ruby-lang.org/ruby.git/commit/?id=a105831819

From a105831819af8d143dd587a93844ca982cfadd67 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 5 Jun 2019 11:03:57 +0900
Subject: tool/runruby.rb: support RUNRUBY_USE_LLDB as well as RUNRUBY_USE_GDB


diff --git a/tool/runruby.rb b/tool/runruby.rb
index a15c038..d9fc1ac 100755
--- a/tool/runruby.rb
+++ b/tool/runruby.rb
@@ -6,6 +6,12 @@ https://github.com/ruby/ruby/blob/trunk/tool/runruby.rb#L6
 show = false
 precommand = []
 srcdir = File.realpath('..', File.dirname(__FILE__))
+case
+when ENV['RUNRUBY_USE_GDB'] == 'true'
+  debugger = :gdb
+when ENV['RUNRUBY_USE_LLDB'] == 'true'
+  debugger = :lldb
+end
 while arg = ARGV[0]
   break ARGV.shift if arg == '--'
   case arg
@@ -132,16 +138,16 @@ end https://github.com/ruby/ruby/blob/trunk/tool/runruby.rb#L138
 
 ENV.update env
 
-if debugger or ENV['RUNRUBY_USE_GDB'] == 'true'
-  if debugger == :gdb or !debugger
+if debugger
+  case debugger
+  when :gdb, nil
     debugger = %W'gdb -x #{srcdir}/.gdbinit'
     if File.exist?(gdb = 'run.gdb') or
       File.exist?(gdb = File.join(abs_archdir, 'run.gdb'))
       debugger.push('-x', gdb)
     end
     debugger << '--args'
-  end
-  if debugger == :lldb
+  when :lldb
     debugger = ['lldb', '-O', "command script import #{srcdir}/misc/lldb_cruby.py"]
     if File.exist?(lldb = 'run.lldb') or
       File.exist?(lldb = File.join(abs_archdir, 'run.lldb'))
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]