[前][次][番号順一覧][スレッド一覧]

ruby-changes:39985

From: ko1 <ko1@a...>
Date: Wed, 7 Oct 2015 01:23:03 +0900 (JST)
Subject: [ruby-changes:39985] ko1:r52066 (trunk): * gc.h, gc.c: introduce new debug function rb_obj_info_dump(VALUE obj)

ko1	2015-10-07 01:22:54 +0900 (Wed, 07 Oct 2015)

  New Revision: 52066

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52066

  Log:
    * gc.h, gc.c: introduce new debug function rb_obj_info_dump(VALUE obj)
      which prints the result of rb_raw_obj_info(..., obj).

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
    trunk/gc.h
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52065)
+++ ChangeLog	(revision 52066)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Oct  7 01:20:46 2015  Koichi Sasada  <ko1@a...>
+
+	* 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@a...>
 
 	* vm_args.c: remove an unused field args_info::calling.
Index: gc.c
===================================================================
--- gc.c	(revision 52065)
+++ gc.c	(revision 52066)
@@ -9049,6 +9049,13 @@ rb_obj_info(VALUE obj) https://github.com/ruby/ruby/blob/trunk/gc.c#L9049
     }
 }
 
+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
Index: gc.h
===================================================================
--- gc.h	(revision 52065)
+++ gc.h	(revision 52066)
@@ -88,6 +88,7 @@ int ruby_get_stack_grow_direction(volati https://github.com/ruby/ruby/blob/trunk/gc.h#L88
 
 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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]