Dump a backtrace with gdb
Because Ruby often fails to dump a C backtrace.
This commit is contained in:
parent
92dfe9aefb
commit
246d7e4f1d
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user