From: Paul Brannan Date: 2002-12-08T03:22:24+09:00 Subject: Re: [RCR] Accessor for trace_func On Sun, Dec 08, 2002 at 03:06:57AM +0900, nathaniel@NOSPAMtalbott.ws wrote: > > It might be nice if the RCR requested that $trace_func be a > > hooked global variable. > > What do you mean by "hooked"? rb_define_hooked_variable creates a hooked variable. This is how $stdin, $stdout, $!, and other variables are implemented. See README.EXT for an explanation. > I thought about this solution, and even played with it, but it doesn't > work at all for my case: the debugger sets its trace_func long before I > get a change to redefine the method. With: http://rm-f.net/~cout/code/ruby/treasures/RubyTreasures-0.4/lib/hacks/fix_trace_func.rb.html I can write: ruby -rfix_trace_func -rtracer -rcrimson_profiler test.rb and I get both tracing and profiling. I had to use a slightly modified profiler to get this to work, but I can't remember why at the moment. Paul