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

ruby-changes:64120

From: Takashi <ko1@a...>
Date: Sun, 13 Dec 2020 11:47:20 +0900 (JST)
Subject: [ruby-changes:64120] 246d7e4f1d (master): Dump a backtrace with gdb

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

From 246d7e4f1d92851356d459f424cbc3491135d1ac Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Sat, 12 Dec 2020 18:46:13 -0800
Subject: Dump a backtrace with gdb

Because Ruby often fails to dump a C backtrace.

diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index bda0235..fbf2572 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -530,6 +530,7 @@ def cleanup_coredump https://github.com/ruby/ruby/blob/trunk/bootstraptest/runner.rb#L530
     core_path = "/tmp/bootstraptest-core.#{Time.now.utc.iso8601}"
     warn "A core file is found. Saving it at: #{core_path.dump}"
     FileUtils.mv('core', core_path)
+    system('gdb', RbConfig.ruby, '-c', core_path, '-ex', 'bt', '-batch')
   end
   FileUtils.rm_f Dir.glob('core.*')
   FileUtils.rm_f @ruby+'.stackdump' if @ruby
diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb
index 888905b..b292f25 100644
--- a/tool/lib/test/unit.rb
+++ b/tool/lib/test/unit.rb
@@ -357,6 +357,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit.rb#L357
           core_path = "/tmp/test-unit-core.#{Time.now.utc.iso8601}"
           warn "A core file is found. Saving it at: #{core_path.dump}"
           FileUtils.mv('core', core_path)
+          system('gdb', RbConfig.ruby, '-c', core_path, '-ex', 'bt', '-batch')
         end
         STDERR.flush
         exit c
-- 
cgit v0.10.2


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

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