Project

General

Profile

Actions

Feature #1395

closed

Steppable Kernel::eval

Added by mistergibson (G. Gibson) about 15 years ago. Updated about 12 years ago.

Status:
Rejected
Target version:
-

Description

=begin
I could really use a steppable eval in the kernel, or a steppable Kernel::Evaluator class. I think this would be very helpful.
=end

Actions #1

Updated by marcandre (Marc-Andre Lafortune) over 14 years ago

  • Category set to core
  • Assignee set to matz (Yukihiro Matsumoto)
  • Priority changed from Normal to 3

=begin

=end

Actions #2

Updated by mame (Yusuke Endoh) about 14 years ago

  • Status changed from Open to Rejected

=begin
Hi,

I could really use a steppable eval in the kernel, or a steppable Kernel::Evaluator class. I think this would be very helpful.

Sorry for late response, but what's "steppable eval" ?
When you register the Feature ticket, please elaborate your request and
use case you expect.

Guessingly, you may want to use Fiber to stop and restart the execution
explicitly, or set_trace_func to interrupt execution step by step.

I close the ticket once. If neither Fiber or set_trace_func can be used,
please re-register a new ticket with elaboration.

--
Yusuke Endoh
=end

Actions #3

Updated by coatl (caleb clausen) about 14 years ago

=begin
I can't speak for the OP, but what I imagine was intended is something lower-level and finer-grained than set_trace_func. It should allow you to step through code at the (YARV) virtual instruction level. That is, there'd be a callback which gets called before every virtual instruction with parameters telling you what the virtual instruction was and where you are in the containing method....

It's much too ambitious to consider for the 1.9.2 release but I think its well worth thinking about for later.
=end

Actions #4

Updated by mame (Yusuke Endoh) about 14 years ago

  • Category set to YARV
  • Status changed from Rejected to Open
  • Assignee changed from matz (Yukihiro Matsumoto) to ko1 (Koichi Sasada)
  • Target version set to 3.0

=begin
Hi,

2010/3/26 caleb clausen :

I can't speak for the OP, but what I imagine was intended is something lower-level and finer-grained than set_trace_func. It should allow you to step through code at the (YARV) virtual instruction level. That is, there'd be a callback which gets called before every virtual instruction with parameters telling you what the virtual instruction was and where you are in the containing method....

It's much too ambitious to consider for the 1.9.2 release but I think its well worth thinking about for later.

Hmm, ok. I reopen the ticket with change of the target to 2.0.

But, what purpose is it for? I can't think of no use case else
debugging YARV. Isn't current set_trace_func enough?

--
Yusuke ENDOH
=end

Actions #5

Updated by rocky (Rocky Bernstein) about 14 years ago

=begin
The existing low-level mechanisms in fact do cover this right now. Higher-level tools like debug.rb may need to be adjusted.

There are a couple support issues in Ruby that I think could be addressed slightly better. In particular making more of a distinction between when a RubyVM instruction sequence that refers to a real file versus an evaluated string which now shows up as filename "(eval)". Right now a number of programs will get confused if someone ever creates a Ruby file called "(eval)".

That said, in an experimental debugger that I have been working on (rbdbgr) stepping through eval strings works fine. There are some little bugs on my side. See "set string substitute" in
http://wiki.github.com/rocky/rbdbgr/cool-things

=end

Actions #6

Updated by coatl (caleb clausen) about 14 years ago

=begin
Assuming Rocky is correct, there's nothing to do; it's been done already. Too bad for me I didn't know about it. Seems like this can be closed now.
=end

Actions #7

Updated by shyouhei (Shyouhei Urabe) over 13 years ago

  • Status changed from Open to Assigned

=begin

=end

Actions #8

Updated by naruse (Yui NARUSE) over 12 years ago

  • Project changed from Ruby master to 14
  • Category deleted (YARV)
  • Target version deleted (3.0)
Actions #9

Updated by naruse (Yui NARUSE) over 12 years ago

  • Project changed from 14 to Ruby master

Updated by mame (Yusuke Endoh) about 12 years ago

  • Status changed from Assigned to Rejected

Closed by reopener's request. Thanks.

--
Yusuke Endoh

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0