Project

General

Profile

« Previous | Next » 

Revision 53a55aef

Added by ko1 (Koichi Sasada) over 4 years ago

introduce RUBY_ON_BUG envval. (#2331)

rb_bug() is called at critical bug, MRI can't run anymore.
To make debug easy, this patch introduces RUBY_ON_BUG environment
variable to specify the process which is called with pid.
[Feature #16090] [GH #2331]

RUBY_ON_BUG='gdb -p' ruby xxx.rb

In this case, if ruby interpreter causes critical bug, and call
rb_bug(), then "gdb -p [PID]' is called by system(3). You can
debug on invoked gdb.

This feature is limited on RUBY_DEVEL build.