aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-06 16:22:54 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-06 16:22:54 +0000
commitb61013e7a7dfea7f356a8fea6b45b8cb73b65498 (patch)
treeb5b4df8283d059e57f78eb4cfed834bc9b1fe90d
parentb205b33048ee65d9c5d8769b8048a560266aa0eb (diff)
downloadruby-b61013e7a7dfea7f356a8fea6b45b8cb73b65498.tar.gz
* 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
-rw-r--r--ChangeLog5
-rw-r--r--gc.c7
-rw-r--r--gc.h1
3 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7d8eb58711..56886d679d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/gc.c b/gc.c
index 2b844479e1..a3f1e9975c 100644
--- a/gc.c
+++ b/gc.c
@@ -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
diff --git a/gc.h b/gc.h
index d1021df444..c723106137 100644
--- a/gc.h
+++ b/gc.h
@@ -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