v1.9 -rprofile -rdebug errors

P

Philip Rhoades

People,

After building the latest nightly version of 1.9, when I try to use:

ruby -rprofile . .

or

ruby -rdebug . .

I get:

:0:in `require': no such file to load -- debug (LoadError)

Is there a configure issue (I couldn't find anything) or is this a bug?

Thanks,

Phil.
--
Philip Rhoades

Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275)
GPO Box 3411
Sydney NSW 2001
Australia
E-mail: (e-mail address removed)
 
R

Roger Pack

1.9 lacks profiling and debugging, currently, AFAIK. I know ruby-debug
doesn't work on it.
-R
 
P

Philip Rhoades

Roger,

Thanks for the confirmation.

Phil.


Roger said:
1.9 lacks profiling and debugging, currently, AFAIK. I know ruby-debug
doesn't work on it.
-R

--
Philip Rhoades

Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275)
GPO Box 3411
Sydney NSW 2001
Australia
E-mail: (e-mail address removed)
 
J

Jeremy Kemper

1.9 lacks profiling and debugging, currently, AFAIK. I know ruby-debug
doesn't work on it.

The latest ruby-debug does support 1.9, but it's incomplete yet.

jeremy
 
R

r

The latestruby-debugdoes support 1.9, but it's incomplete yet.

jeremy

ruby-debug doesn't work in 1.9; my estimate is that it will be a while
before it works anywhere well as it does on 1.8.

A summer student was very interested in making it work on 1.9 via
Google 2008 Summer of Code and the Ruby Foundation, but the other
mentors and administrator felt there were other projects which were
much more important. So that summer student is instead working on
another project in Python.
 
J

Jeremy Kemper

ruby-debug doesn't work in 1.9; my estimate is that it will be a while
before it works anywhere well as it does on 1.8.

It does work, but is in, uh, 'alpha' form :) I've been using it for a while.
A summer student was very interested in making it work on 1.9 via
Google 2008 Summer of Code and the Ruby Foundation, but the other
mentors and administrator felt there were other projects which were
much more important. So that summer student is instead working on
another project in Python.

That's too bad. I think it's a very important project.

jeremy
 
R

Roger Pack

The latest ruby-debug does support 1.9, but it's incomplete yet.

jeremy

For some reason I can't get svn trunk to compile. Or for rake to work,
with 1.9, as of today.
Any help appreciated :)
-R
 
R

r

It does work, but is in, uh, 'alpha' form :) =A0I've been using it for a =
while.

Perhaps you are confusing this with of debug.rb which comes with Ruby
and you invoke via
ruby -rdebug myscript.rb opt1...

ruby-debug is something a bit different -- it's sometimes referred to
as
the "fast" debugger".

The reason ruby-debug doesn't work in Ruby 1.9 is because it hooks
into C API. This API has of necessity drastically changed between 1.8
and 1.9. Furthermore, things that were exposed and available in 1.8
are not yet available in 1.9.

More fundamentally though, 1.9 produces VM instructions and this
imposes a change in the way debugging or tracing works. If you want to
step Ruby statements the code you want to debug has to be "compiled"
for debugging, e.g.:

VM::InstructionSequence.compile_option =3D {
trace_instruction: true
}

Otherwise you can only stop the other events: calls and returns,
exceptions. And even here since 1.9 optimize some calls may be
optimized away. (I read somewhere in a discussion of benchmarks that
it performs tail recursion elimination.)

One way around provide debugging here then is to do it in a slighty
different way which was used on old assembly debuggers and I believe
is used in rubinius. You replace VM instructions you want to stop or
breakpoint at with a call to a handler (e.g. a debugger) and on return
from the handler patch or simulate the instruction that was patched
in.

This nontrivial piece of work is what that the Google 2008 Summer of
Code Student was going to work on.
 
R

Roger Pack

Jeremy said:
It does work, but is in, uh, 'alpha' form :) I've been using it for a
while.

Is there a location we can get to that?
:)
That's too bad. I think it's a very important project.

jeremy

Second that. Lack of ruby-debug is the only reason I don't use 1.9 as
of now.
-R
 
R

r

Is there a location we can get to that?
:)






Second that. Lack ofruby-debugis the only reason I don't use 1.9 as
of now.
-R

Over time 1.8.x over time will be getting some of the 1.9 goodness.
And there is good news on the 1.9 front as well. Koichi says the 1.9
VM will have dynamic (as opposed to compiled) trace/debugging support.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top