1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.h, gc.c: introduce new debug function rb_obj_info_dump(VALUE obj)

which prints the result of rb_raw_obj_info(..., obj).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2015-10-06 16:22:54 +00:00
parent 9ba933dc01
commit 31ee824ef4
3 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Wed Oct 7 01:20:46 2015 Koichi Sasada <ko1@atdot.net>
* gc.h, gc.c: introduce new debug function rb_obj_info_dump(VALUE obj)
which prints the result of rb_raw_obj_info(..., obj).
Wed Oct 7 01:16:11 2015 Koichi Sasada <ko1@atdot.net>
* vm_args.c: remove an unused field args_info::calling.

7
gc.c
View file

@ -9049,6 +9049,13 @@ rb_obj_info(VALUE obj)
}
}
void
rb_obj_info_dump(VALUE obj)
{
char buff[0x100];
fprintf(stderr, "rb_obj_info_dump: %s\n", rb_raw_obj_info(buff, 0x100, obj));
}
#if GC_DEBUG
void

1
gc.h
View file

@ -88,6 +88,7 @@ int ruby_get_stack_grow_direction(volatile VALUE *addr);
const char *rb_obj_info(VALUE obj);
const char *rb_raw_obj_info(char *buff, const int buff_size, VALUE obj);
void rb_obj_info_dump(VALUE obj);
RUBY_SYMBOL_EXPORT_BEGIN