[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

v1.9 -rprofile -rdebug errors

Phil Rhoades

6/25/2008 9:48:00 AM

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: phil@pricom.com.au

10 Answers

Roger Pack

6/26/2008 12:56:00 AM

0

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

> 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?
--
Posted via http://www.ruby-....

Phil Rhoades

6/26/2008 1:08:00 AM

0

Roger,

Thanks for the confirmation.

Phil.


Roger Pack wrote:
> 1.9 lacks profiling and debugging, currently, AFAIK. I know ruby-debug
> doesn't work on it.
> -R
>
>> 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?

--
Philip Rhoades

Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275)
GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au

Jeremy Kemper

6/26/2008 1:24:00 AM

0

On Wed, Jun 25, 2008 at 5:55 PM, Roger Pack <rogerpack2005@gmail.com> wrote:
> 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

Roger Pack

6/26/2008 2:23:00 AM

0

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

I take that back.
http://rubyforge.org/forum/forum.php?foru...
seems to imply that 1.9 is supported for ruby-prof. I haven't used it
but it might be.
-R
--
Posted via http://www.ruby-....

r

6/26/2008 2:15:00 PM

0

On Jun 25, 9:24 pm, Jeremy Kemper <jer...@bitsweat.net> wrote:
> On Wed, Jun 25, 2008 at 5:55 PM, Roger Pack <rogerpack2...@gmail.com> wrote:
> > 1.9 lacks profiling and debugging, currently, AFAIK. I knowruby-debug
> > doesn't work on it.
>
> 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.

Jeremy Kemper

6/26/2008 4:11:00 PM

0

On Thu, Jun 26, 2008 at 7:12 AM, r <rocky.bernstein@gmail.com> wrote:
> On Jun 25, 9:24 pm, Jeremy Kemper <jer...@bitsweat.net> wrote:
>> On Wed, Jun 25, 2008 at 5:55 PM, Roger Pack <rogerpack2...@gmail.com> wrote:
>> > 1.9 lacks profiling and debugging, currently, AFAIK. I knowruby-debug
>> > doesn't work on it.
>>
>> The latest ruby-debug does 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.

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

Roger Pack

6/26/2008 5:33:00 PM

0


> 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
--
Posted via http://www.ruby-....

r

6/26/2008 11:35:00 PM

0



On Jun 26, 12:10=A0pm, "Jeremy Kemper" <jer...@bitsweat.net> wrote:
> On Thu, Jun 26, 2008 at 7:12 AM, r <rocky.bernst...@gmail.com> wrote:
> > On Jun 25, 9:24 pm, Jeremy Kemper <jer...@bitsweat.net> wrote:
> >> On Wed, Jun 25, 2008 at 5:55 PM, Roger Pack <rogerpack2...@gmail.com> =
wrote:
> >> > 1.9 lacks profiling and debugging, currently, AFAIK. =A0I knowruby-d=
ebug
> >> > doesn't work on it.
>
> >> The latestruby-debugdoes support 1.9, but it's incomplete yet.
>
> >> jeremy
>
> >ruby-debugdoesn'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 :) =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.


>
> > 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

Roger Pack

7/16/2008 7:58:00 PM

0

Jeremy Kemper wrote:
> On Thu, Jun 26, 2008 at 7:12 AM, r <rocky.bernstein@gmail.com> wrote:
>> 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.

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

>
>> 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

Second that. Lack of ruby-debug is the only reason I don't use 1.9 as
of now.
-R
--
Posted via http://www.ruby-....

r

7/17/2008 12:49:00 AM

0



On Jul 16, 3:57 pm, Roger Pack <rogerpack2...@gmail.com> wrote:
> Jeremy Kemper wrote:
> > On Thu, Jun 26, 2008 at 7:12 AM, r <rocky.bernst...@gmail.com> wrote:
> >> 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.
>
> Is there a location we can get to that?
> :)
>
>
>
> >> 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
>
> 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.

> --
> Posted viahttp://www.ruby-....