diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2020-12-12 18:46:13 -0800 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2020-12-12 18:46:24 -0800 |
commit | 246d7e4f1d92851356d459f424cbc3491135d1ac (patch) | |
tree | c8ad5f7695672f7eeecc855cd532592447ff8e74 /bootstraptest/runner.rb | |
parent | 92dfe9aefb62e526bf30b42168ecd4fc9a9db1cf (diff) | |
download | ruby-246d7e4f1d92851356d459f424cbc3491135d1ac.tar.gz |
Dump a backtrace with gdb
Because Ruby often fails to dump a C backtrace.
Diffstat (limited to 'bootstraptest/runner.rb')
-rwxr-xr-x | bootstraptest/runner.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb index bda02355bd..fbf2572ffb 100755 --- a/bootstraptest/runner.rb +++ b/bootstraptest/runner.rb @@ -530,6 +530,7 @@ def cleanup_coredump 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 |