From edb80dfe3e6086fb9d5d905a40cdd6ec61a2e1ee Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Thu, 5 Dec 2019 14:39:03 +0900 Subject: add additional CF info for CI env Introduce new RUBY_DEBUG option 'ci' to inform Ruby interpreter that an interpreter is running on CI environment. With this option, `rb_bug()` shows more information includes method entry information, local variables information for each control frame. --- gc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index 4d99261e39..3a62f57e36 100644 --- a/gc.c +++ b/gc.c @@ -11344,8 +11344,8 @@ obj_type_name(VALUE obj) return type_name(TYPE(obj), obj); } -static const char * -method_type_name(rb_method_type_t type) +const char * +rb_method_type_name(rb_method_type_t type) { switch (type) { case VM_METHOD_TYPE_ISEQ: return "iseq"; @@ -11361,7 +11361,7 @@ method_type_name(rb_method_type_t type) case VM_METHOD_TYPE_UNDEF: return "undef"; case VM_METHOD_TYPE_NOTIMPLEMENTED: return "notimplemented"; } - rb_bug("method_type_name: unreachable (type: %d)", type); + rb_bug("rb_method_type_name: unreachable (type: %d)", type); } /* from array.c */ @@ -11564,7 +11564,7 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj) if (me->def) { APPENDF((BUFF_ARGS, "(called_id: %s, type: %s, alias: %d, owner: %s, defined_class: %s)", rb_id2name(me->called_id), - method_type_name(me->def->type), + rb_method_type_name(me->def->type), me->def->alias_count, obj_info(me->owner), obj_info(me->defined_class))); -- cgit v1.2.3