Created
August 11, 2015 08:05
-
-
Save brendon9x/642199f63dff297c749e to your computer and use it in GitHub Desktop.
Ruby stack dump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define redirect_stdout | |
call rb_eval_string("$_old_stdout, $stdout = $stdout, File.open('/tmp/ruby-debug.' + Process.pid.to_s, 'a'); $stdout.sync = true") | |
end | |
define ruby_eval | |
call(rb_p(rb_eval_string_protect($arg0,(int*)0))) | |
end | |
redirect_stdout | |
ruby_eval("Thread.list.each { |t| puts t.backtrace.join(%Q[\n]) }") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment