From: "banister (john mair)" Date: 2012-10-28T21:08:57+09:00 Subject: [ruby-core:48516] [ruby-trunk - Bug #7214] Ruby 2.0 breaks support for some debugging tools Issue #7214 has been updated by banister (john mair). The API is this: class methods -- # return the binding for the nth caller, where Binding.of_caller(0) == binding Binding.of_caller(n) # return an array of all the caller bindings (this is useful when you want to take a snap-shot of the entire call stack for later inspection, as in pry-rescue) Binding.callers instance methods -- # the frame type, e.g :block, :class, :top, :lambda, :method i.e VM_FRAME_MAGIC_METHOD Binding#frame_type # The frame description, i.e cfp->iseq->name on 1.9.3, returns stuff like "block in my_method" Binding#frame_description # The number of frames currently on the stack Binding#frame_count Note that we skip some frames (such as VM_FRAME_MAGIC_IFUNC) as introspecting on them appears to return junk data. ---------------------------------------- Bug #7214: Ruby 2.0 breaks support for some debugging tools https://bugs.ruby-lang.org/issues/7214#change-31864 Author: banister (john mair) Status: Open Priority: Normal Assignee: ko1 (Koichi Sasada) Category: core Target version: 2.0.0 ruby -v: ruby 2.0.0dev (2012-10-18 trunk 37260) [x86_64-linux] Notably the "Pry" debugger breaks, and (though i haven't checked) I'm assuming the 'debugger' project as well. The reason for the breakages (as far as i can see) is that the `rb_vm_make_env_object` function is now hidden. In the comments for 1.9.3's vm.c it was stated an alternative API for `rb_vm_make_env_object` (see https://github.com/ruby/ruby/blob/ruby_1_9_3/vm.c#L53-60) would be provided, but I have been unable to find one. Can you please inform me of where I can find the new API (if it exists), or alternatively, provide a work-around so we can get the debuggers working on Ruby 2.0 Thanks -- http://bugs.ruby-lang.org/