* vm.c (check_env): print debug messages to stderr.

[Feature #4871] [ruby-dev:43743]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ktsj 2011-07-31 14:11:37 +00:00
parent 172ac007f8
commit 3441301d7d
2 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,8 @@
Sun Jul 31 23:06:57 2011 Kazuki Tsujimoto <kazuki@callcc.net>
* vm.c (check_env): print debug messages to stderr.
[Feature #4871] [ruby-dev:43743]
Sun Jul 31 22:50:23 2011 Kazuki Tsujimoto <kazuki@callcc.net>
* vm.c (vm_make_env_each): don't save prev env value.

14
vm.c
View File

@ -302,16 +302,16 @@ static VALUE check_env_value(VALUE envval);
static int
check_env(rb_env_t * const env)
{
printf("---\n");
printf("envptr: %p\n", (void *)&env->block.dfp[0]);
printf("envval: %10p ", (void *)env->block.dfp[1]);
fprintf(stderr, "---\n");
fprintf(stderr, "envptr: %p\n", (void *)&env->block.dfp[0]);
fprintf(stderr, "envval: %10p ", (void *)env->block.dfp[1]);
dp(env->block.dfp[1]);
printf("lfp: %10p\n", (void *)env->block.lfp);
printf("dfp: %10p\n", (void *)env->block.dfp);
fprintf(stderr, "lfp: %10p\n", (void *)env->block.lfp);
fprintf(stderr, "dfp: %10p\n", (void *)env->block.dfp);
if (env->prev_envval) {
printf(">>\n");
fprintf(stderr, ">>\n");
check_env_value(env->prev_envval);
printf("<<\n");
fprintf(stderr, "<<\n");
}
return 1;
}