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

ruby-changes:10114

From: ko1 <ko1@a...>
Date: Mon, 19 Jan 2009 11:10:01 +0900 (JST)
Subject: [ruby-changes:10114] Ruby:r21657 (trunk): * vm_dump.c: add a prefix "rb_vmdebug_" to

ko1	2009-01-19 11:09:43 +0900 (Mon, 19 Jan 2009)

  New Revision: 21657

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

  Log:
    * vm_dump.c: add a prefix "rb_vmdebug_" to
      vm_stack_dump_raw(), vm_stack_dump_raw_current(),
      vm_env_dump_raw(), vm_proc_dump_raw(), vm_stack_dump_th(),
      vm_debug_print_register(), vm_thread_dump_regs(),
      vm_debug_print_pre(), vm_debug_print_post(),
      vm_thread_dump_state().
      This change also may affect core (in fact, user of
      above functions may be only ko1).
    * vm_core.h: ditto.
    * vm_exec.h (SDR2): remove duplicate definition.

  Modified files:
    trunk/ChangeLog
    trunk/vm_core.h
    trunk/vm_dump.c
    trunk/vm_exec.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21656)
+++ ChangeLog	(revision 21657)
@@ -1,3 +1,18 @@
+Mon Jan 19 11:02:30 2009  Koichi Sasada  <ko1@a...>
+
+	* vm_dump.c: add a prefix "rb_vmdebug_" to
+	  vm_stack_dump_raw(), vm_stack_dump_raw_current(),
+	  vm_env_dump_raw(), vm_proc_dump_raw(), vm_stack_dump_th(),
+	  vm_debug_print_register(), vm_thread_dump_regs(),
+	  vm_debug_print_pre(), vm_debug_print_post(),
+	  vm_thread_dump_state().
+	  This change also may affect core (in fact, user of
+	  above functions may be only ko1).
+
+	* vm_core.h: ditto.
+
+	* vm_exec.h (SDR2): remove duplicate definition.
+
 Mon Jan 19 11:00:44 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/socket/raddrinfo.c (addrinfo_ip_port): use AF_INET6 only when
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 21656)
+++ vm_core.h	(revision 21657)
@@ -569,9 +569,9 @@
 VALUE rb_proc_alloc(VALUE klass);
 
 /* for debug */
-extern void vm_stack_dump_raw(rb_thread_t *, rb_control_frame_t *);
-#define SDR() vm_stack_dump_raw(GET_THREAD(), GET_THREAD()->cfp)
-#define SDR2(cfp) vm_stack_dump_raw(GET_THREAD(), (cfp))
+extern void rb_vmdebug_stack_dump_raw(rb_thread_t *, rb_control_frame_t *);
+#define SDR() rb_vmdebug_stack_dump_raw(GET_THREAD(), GET_THREAD()->cfp)
+#define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_THREAD(), (cfp))
 void rb_vm_bugreport(void);
 
 
Index: vm_exec.h
===================================================================
--- vm_exec.h	(revision 21656)
+++ vm_exec.h	(revision 21657)
@@ -59,9 +59,6 @@
 #define throwdebug if(0)printf
 /* #define throwdebug printf */
 
-#define SDR2(cfp) vm_stack_dump_raw(GET_THREAD(), (cfp))
-
-
 /************************************************/
 #if   DISPATCH_XXX
 error !
Index: vm_dump.c
===================================================================
--- vm_dump.c	(revision 21656)
+++ vm_dump.c	(revision 21657)
@@ -143,7 +143,7 @@
 }
 
 void
-vm_stack_dump_raw(rb_thread_t *th, rb_control_frame_t *cfp)
+rb_vmdebug_stack_dump_raw(rb_thread_t *th, rb_control_frame_t *cfp)
 {
 #if 0
     VALUE *sp = cfp->sp, *bp = cfp->bp;
@@ -180,14 +180,14 @@
 }
 
 void
-vm_stack_dump_raw_current(void)
+rb_vmdebug_stack_dump_raw_current(void)
 {
     rb_thread_t *th = GET_THREAD();
-    vm_stack_dump_raw(th, th->cfp);
+    rb_vmdebug_stack_dump_raw(th, th->cfp);
 }
 
 void
-vm_env_dump_raw(rb_env_t *env, VALUE *lfp, VALUE *dfp)
+rb_vmdebug_env_dump_raw(rb_env_t *env, VALUE *lfp, VALUE *dfp)
 {
     int i;
     fprintf(stderr, "-- env --------------------\n");
@@ -215,7 +215,7 @@
 }
 
 void
-vm_proc_dump_raw(rb_proc_t *proc)
+rb_vmdebug_proc_dump_raw(rb_proc_t *proc)
 {
     rb_env_t *env;
     char *selfstr;
@@ -225,18 +225,18 @@
     fprintf(stderr, "-- proc -------------------\n");
     fprintf(stderr, "self: %s\n", selfstr);
     GetEnvPtr(proc->envval, env);
-    vm_env_dump_raw(env, proc->block.lfp, proc->block.dfp);
+    rb_vmdebug_env_dump_raw(env, proc->block.lfp, proc->block.dfp);
 }
 
 void
-vm_stack_dump_th(VALUE thval)
+rb_vmdebug_stack_dump_th(VALUE thval)
 {
     rb_thread_t *th;
     GetThreadPtr(thval, th);
-    vm_stack_dump_raw(th, th->cfp);
+    rb_vmdebug_stack_dump_raw(th, th->cfp);
 }
 
-void
+static void
 vm_stack_dump_each(rb_thread_t *th, rb_control_frame_t *cfp)
 {
     int i;
@@ -325,7 +325,7 @@
 
 
 void
-vm_debug_print_register(rb_thread_t *th)
+rb_vmdebug_debug_print_register(rb_thread_t *th)
 {
     rb_control_frame_t *cfp = th->cfp;
     int pc = -1;
@@ -348,15 +348,15 @@
 }
 
 void
-vm_thread_dump_regs(VALUE thval)
+rb_vmdebug_thread_dump_regs(VALUE thval)
 {
     rb_thread_t *th;
     GetThreadPtr(thval, th);
-    vm_debug_print_register(th);
+    rb_vmdebug_debug_print_register(th);
 }
 
 void
-vm_debug_print_pre(rb_thread_t *th, rb_control_frame_t *cfp)
+rb_vmdebug_debug_print_pre(rb_thread_t *th, rb_control_frame_t *cfp)
 {
     rb_iseq_t *iseq = cfp->iseq;
 
@@ -370,12 +370,12 @@
 
 #if VMDEBUG > 3
     fprintf(stderr, "        (1)");
-    vm_debug_print_register(th);
+    rb_vmdebug_debug_print_register(th);
 #endif
 }
 
 void
-vm_debug_print_post(rb_thread_t *th, rb_control_frame_t *cfp
+rb_vmdebug_debug_print_post(rb_thread_t *th, rb_control_frame_t *cfp
 #if OPT_STACK_CACHING
 		 , VALUE reg_a, VALUE reg_b
 #endif
@@ -387,7 +387,7 @@
 
 #if VMDEBUG > 3
     fprintf(stderr, "        (2)");
-    vm_debug_print_register(th);
+    rb_vmdebug_debug_print_register(th);
 #endif
     /* stack_dump_raw(th, cfp); */
 
@@ -549,7 +549,7 @@
 #endif
 
 VALUE
-vm_thread_dump_state(VALUE self)
+rb_vmdebug_thread_dump_state(VALUE self)
 {
     rb_thread_t *th;
     rb_control_frame_t *cfp;

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

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