mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Dump a backtrace with gdb
Because Ruby often fails to dump a C backtrace.
This commit is contained in:
parent
92dfe9aefb
commit
246d7e4f1d
2 changed files with 2 additions and 0 deletions
|
@ -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…
Reference in a new issue