Details

    • Number of attachments :
      1

      Description

      $ jruby -v --1.9 -d --debug -rdebug -e 0
      jruby 1.6.0.RC1 (ruby 1.9.2 patchlevel 136) (2011-01-19 36b741d) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) [darwin-x86_64-java]
      Exception `LoadError' at /Users/asari/Development/src/jruby/lib/ruby/site_ruby/shared/Win32API.rb:2 - Win32API only supported on win32
      Exception `LoadError' at org/jruby/RubyKernel.java:1050 - no such file to load -- continuation
      org/jruby/RubyKernel.java:1050:in `require19': no such file to load -- continuation (LoadError)
      	from /Users/asari/Development/src/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
      	from /Users/asari/Development/src/jruby/lib/ruby/1.9/debug.rb:5:in `(root)'
      

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        I made a quick attempt to fix this, but the 1.9 debugger actually hooks into the instruction logic and RubyVM modules. It won't be something we can just patch.

        Also tried copying 1.8's debugger over, but it uses critical a lot. Those could probably just be commented out.

        For anyone else looking into this...you should use the "jruby" branches on our Ruby fork to get a copy of our forked stdlib: https://github.com/jruby/ruby

        Show
        Charles Oliver Nutter added a comment - I made a quick attempt to fix this, but the 1.9 debugger actually hooks into the instruction logic and RubyVM modules. It won't be something we can just patch. Also tried copying 1.8's debugger over, but it uses critical a lot. Those could probably just be commented out. For anyone else looking into this...you should use the "jruby" branches on our Ruby fork to get a copy of our forked stdlib: https://github.com/jruby/ruby
        Hide
        Hiro Asari added a comment -

        That seems to work.

        $ jruby -v --1.9 -d --debug -rdebug test/test_mathn_1_9.rb 
        jruby 1.6.0.RC1 (ruby 1.9.2 patchlevel 136) (2011-01-30 ddcc246) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) [darwin-x86_64-java]
        Exception `LoadError' at /Users/asari/Development/src/jruby/lib/ruby/site_ruby/shared/Win32API.rb:2 - Win32API only supported on win32
        /Users/asari/Development/src/jruby/lib/ruby/1.9/debug.rb:344 warning: shadowing outer local variable - b
        /Users/asari/Development/src/jruby/lib/ruby/1.9/debug.rb:635 warning: shadowing outer local variable - n
        /Users/asari/Development/src/jruby/lib/ruby/1.9/debug.rb:830 warning: shadowing outer local variable - th
        Debug.rb
        Emacs support available.
        
        test/test_mathn_1_9.rb:1:require 'test/unit'
        (rdb:1) b 11
        Set breakpoint 1 at test/test_mathn_1_9.rb:11
        (rdb:1) c
        Loaded suite test/test_mathn_1_9
        Started
        .Breakpoint 1, test_rational_with_0_remainder_is_fixnum at test/test_mathn_1_9.rb:11
        test/test_mathn_1_9.rb:11:    assert_equal(Fixnum, Rational(42,7).class)
        (rdb:1) c
        .
        Finished in 4.602000 seconds.
        
        2 tests, 2 assertions, 0 failures, 0 errors, 0 skips
        
        Test run options: --seed 60250
        
        Show
        Hiro Asari added a comment - That seems to work. $ jruby -v --1.9 -d --debug -rdebug test/test_mathn_1_9.rb jruby 1.6.0.RC1 (ruby 1.9.2 patchlevel 136) (2011-01-30 ddcc246) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) [darwin-x86_64-java] Exception `LoadError' at /Users/asari/Development/src/jruby/lib/ruby/site_ruby/shared/Win32API.rb:2 - Win32API only supported on win32 /Users/asari/Development/src/jruby/lib/ruby/1.9/debug.rb:344 warning: shadowing outer local variable - b /Users/asari/Development/src/jruby/lib/ruby/1.9/debug.rb:635 warning: shadowing outer local variable - n /Users/asari/Development/src/jruby/lib/ruby/1.9/debug.rb:830 warning: shadowing outer local variable - th Debug.rb Emacs support available. test/test_mathn_1_9.rb:1:require 'test/unit' (rdb:1) b 11 Set breakpoint 1 at test/test_mathn_1_9.rb:11 (rdb:1) c Loaded suite test/test_mathn_1_9 Started .Breakpoint 1, test_rational_with_0_remainder_is_fixnum at test/test_mathn_1_9.rb:11 test/test_mathn_1_9.rb:11: assert_equal(Fixnum, Rational(42,7).class) (rdb:1) c . Finished in 4.602000 seconds. 2 tests, 2 assertions, 0 failures, 0 errors, 0 skips Test run options: --seed 60250
        Hide
        Hiro Asari added a comment -

        In case anyone is interested in testing, I attached the patch for lib/ruby/1.9/debug.rb.

        I took https://github.com/jruby/ruby/blob/f99fec6f38aaec55a4e7e8e7b6bf2da6534833d2/lib/debug.rb and commented out Thread.critical.

        Show
        Hiro Asari added a comment - In case anyone is interested in testing, I attached the patch for lib/ruby/1.9/debug.rb. I took https://github.com/jruby/ruby/blob/f99fec6f38aaec55a4e7e8e7b6bf2da6534833d2/lib/debug.rb and commented out Thread.critical .
        Hide
        Hiro Asari added a comment -

        I missed the boat on RC2. If there is an RC3, I'd put it in master, but otherwise we should just wait until 1.6.1.

        Show
        Hiro Asari added a comment - I missed the boat on RC2. If there is an RC3, I'd put it in master, but otherwise we should just wait until 1.6.1.
        Hide
        Thomas E Enebo added a comment -

        Hiro you can land this. The debugger doesn't work at all right now in 1.9. Your patch won't hurt it.

        Show
        Thomas E Enebo added a comment - Hiro you can land this. The debugger doesn't work at all right now in 1.9. Your patch won't hurt it.
        Hide
        Hiro Asari added a comment -

        Applied the patch in 951404f.

        Show
        Hiro Asari added a comment - Applied the patch in 951404f.

          People

          • Assignee:
            Hiro Asari
            Reporter:
            Hiro Asari
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: