summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-12-12 18:46:13 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2020-12-12 18:46:24 -0800
commit246d7e4f1d92851356d459f424cbc3491135d1ac (patch)
treec8ad5f7695672f7eeecc855cd532592447ff8e74 /tool
parent92dfe9aefb62e526bf30b42168ecd4fc9a9db1cf (diff)
Dump a backtrace with gdb
Because Ruby often fails to dump a C backtrace.
Diffstat (limited to 'tool')
-rw-r--r--tool/lib/test/unit.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb
index 888905b36c..b292f25280 100644
--- a/tool/lib/test/unit.rb
+++ b/tool/lib/test/unit.rb
@@ -357,6 +357,7 @@ module Test
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