Debug the command used for gdb dump

It's not working
http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/3288206. I'm
debugging why.
This commit is contained in:
Takashi Kokubun 2020-12-13 23:35:27 -08:00
parent 8d83334a69
commit aacd2295d0
No known key found for this signature in database
GPG Key ID: 6FFC433B12EE23DD
2 changed files with 6 additions and 2 deletions

View File

@ -530,7 +530,9 @@ def cleanup_coredump
core_path = "/tmp/bootstraptest-core.#{Time.now.utc.iso8601}" core_path = "/tmp/bootstraptest-core.#{Time.now.utc.iso8601}"
warn "A core file is found. Saving it at: #{core_path.dump}" warn "A core file is found. Saving it at: #{core_path.dump}"
FileUtils.mv('core', core_path) FileUtils.mv('core', core_path)
system('gdb', @ruby, '-c', core_path, '-ex', 'bt', '-batch') cmd = ['gdb', @ruby, '-c', core_path, '-ex', 'bt', '-batch']
p cmd # debugging why it's not working
system(*cmd)
end end
FileUtils.rm_f Dir.glob('core.*') FileUtils.rm_f Dir.glob('core.*')
FileUtils.rm_f @ruby+'.stackdump' if @ruby FileUtils.rm_f @ruby+'.stackdump' if @ruby

View File

@ -357,7 +357,9 @@ module Test
core_path = "/tmp/test-unit-core.#{Time.now.utc.iso8601}" core_path = "/tmp/test-unit-core.#{Time.now.utc.iso8601}"
warn "A core file is found. Saving it at: #{core_path.dump}" warn "A core file is found. Saving it at: #{core_path.dump}"
FileUtils.mv('core', core_path) FileUtils.mv('core', core_path)
system('gdb', RbConfig.ruby, '-c', core_path, '-ex', 'bt', '-batch') cmd = ['gdb', RbConfig.ruby, '-c', core_path, '-ex', 'bt', '-batch']
p cmd # debugging why it's not working
system(*cmd)
end end
STDERR.flush STDERR.flush
exit c exit c