Giter Site home page Giter Site logo

ruby-debug / ruby-debug Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 8.0 1.76 MB

ruby-debug for Ruby 1.8

Home Page: http://teamcity.jetbrains.com/project.html?projectId=project51

License: BSD 2-Clause "Simplified" License

Ruby 52.72% C 19.73% Java 24.41% Batchfile 3.10% Roff 0.04%

ruby-debug's Introduction

= ruby-debug

== Content

This repository contains sources of two gems:

* ruby-debug-base - backend for the ruby (mri & jruby) debugger: https://rubygems.org/gems/ruby-debug-base

* ruby-debug - CLI for the ruby-debug-base: https://rubygems.org/gems/ruby-debug

== Overview

ruby-debug is a fast implementation of the standard debugger debug.rb.
The faster execution speed is achieved by utilizing a new hook in the
Ruby C API.

== Requirements

ruby-debug requires Ruby 1.8.4 or higher.

Unless you get the packages as a binary (Microsoft Windows binaries
are sometimes available), you'll need a C compiler and Ruby
development headers, and a Make program so the extension in
ruby-debug-base can be compiled when it is installed.

To install on Microsoft Windows, unless you run under cygwin or mingw
you'll need Microsoft Visual C++ 6.0 also known as VC6.
http://rubyforge.org/tracker/index.php?func=detail&aid=16774&group_id=1900&atid=7436
suggests why.


== Install

ruby-debug is provided as a RubyGem.  To install:

<tt>gem install ruby-debug</tt>

This should also pull in <tt>ruby-debug-base</tt> as a dependency.

(If you install ruby-debug-base explicitly, you can add in the <tt>--test</tt>
option after "install" to have the regression test run before
installing.)

For Emacs support and the Reference Manual, get
<tt>ruby-debug-extra</tt>.  This is not a RubyGem, you'll need a Make
program and a POSIX shell. With this installed, run:

  sh ./configure
  make
  make test # optional, but a good idea
  sudo make install


==== Install on MS Windows

Compiling under cygwin or mingw works like it does on Unix. 

* Have Microsoft Visual C++ 6.0 (VC6) installed - exactly that version.

* Set the appropriate environment variables.

* run `nmake'.

* Copy ruby_debug.so to `win32'.

* Go to the ruby_debug root.

* rake win32_gem

* The file is in named `rdebug-debug-base-0.10.0-mswin32.gem'.

== Usage

There are two ways of running ruby-debug.

=== rdebug executable:

$ rdebug <your-script>

When you start your script this way, the debugger will stop at
the first line of code in the script file. So you will be able 
to set up your breakpoints.

=== ruby-debug API

The second way is to use the ruby-debug API to interrupt your
code execution at run time.

  require 'ruby-debug' ; Debugger.start
  ...
  def your_method
    ...
    debugger
    ...
  end

or

  require 'ruby-debug' ; 
  Debugger.start do 
    ...
    debugger
  end

When Kernel#debugger method is executed, the debugger is activated
and you will be able to inspect and step through your code.

== Performance

The <tt>debug.rb</tt> script that comes with the standard Ruby library uses
<tt>Kernel#set_trace_func</tt> API. Implementing the debugger in pure Ruby has
a negative impact on the speed of your program execution. This is
because the Ruby interpreter creates a Binding object each trace call,
even though it is not being used most of the time. ruby-debug moves
most of the functionality for Binding access and for breakpoint
testing to a native extension. Because this code is in C and because
and can be selectively enabled or disabled, the overhead in running
your program can be minimized.

== License

See LICENSE for license information.



= ruby-debug-base for JRuby

== Overview

(j)ruby-debug-base provides the fast debugger extension for JRuby interpreter.
It is the same as ruby-debug-base native C extension from ruby-debug project
(http://rubyforge.org/projects/ruby-debug/), but for JRuby.

== Install

(j)ruby-debug-base is available as a RubyGem:

   jruby -S gem install ruby-debug-base

== Usage

The usage is then the same as with native ruby-debugger, but you might need to
force JRuby which has to run in interpreted mode. Simplest usage is:

  $ jruby --debug -S rdebug <your-script>

Or easier, you might create 'jruby-dm' ('dm' for 'debugger-mode'):

  $ cat ~/bin/jruby-dm
  #!/bin/bash
  jruby --debug "$@"

Then you may run just as you used to:

  $ jruby-dm -S rdebug <your-script>

For more information see: http://bashdb.sourceforge.net/ruby-debug.html

To build run:

  $ rake java gem

== License

See MIT-LICENSE for license information.

ruby-debug's People

Contributors

denofevil avatar enebo avatar gfowley avatar hurricup avatar jfirebaugh avatar nicksieger avatar os97673 avatar rocky avatar viuginick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ruby-debug's Issues

Cannot debug multiple threads if any block in debug code

The following JRuby bug seems to be a ruby-debug bug: http://jira.codehaus.org/browse/JRUBY-6083

The problem here is that two threads are active, one of them enters debug code and sleeps (presumably waiting for IDE or user feedback) and then all other threads freeze waiting for that debug code to proceed.

The problem is that DebugEventHook always synchronizes against itself when entering debug code. This works ok for non-blocking debugging, but in any case where someone is attempting to step through code or inspect state, all other threads grind to a halt. I do not think this is correct behavior.

I'm not sure of the appropriate fix at this time, since I'm not intimately familiar with ruby-debug's codebase. But it seems like if DebugEventHook were modified to contain per-thread data rather than shared data, it shouldn't need to synchronize.

Anyone out there want to help me fix and resolve this?

Add Pause Functionality

I vote for Pause functionality to be added to ruby-debug, whereby a keyboard shortcut can be used to pause running ruby code as if a breakpoint were added to the next line of execution.

Can't install on Mountain Lion

I'm trying to install ruby-debug on a fresh install of Mountain Lion with the latest command line tools and ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0], but I can't get it to install. Here is the full error:

Building native extensions. This could take a while...
ERROR: Error installing ruby-debug:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
creating Makefile

make
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c trace_nums.c
xcrun: Error: failed to exec real xcrun. (No such file or directory)
cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o trace_nums.bundle trace_nums.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -lruby -lpthread -ldl -lobjc
clang: error: no such file or directory: 'trace_nums.o'
make: *** [trace_nums.bundle] Error 1

Cannot build on JRuby 9k due to changed interface in DynamicScope and StaticScope

I've been trying to build the JRuby version ruby-debug-base which JRuby 9.1.2.0 and it fails with:

src/org/jruby/debug/Context.java:409: error: cannot find symbol
        int count = scope.getRequiredArgs() + scope.getOptionalArgs();
                         ^
  symbol:   method getRequiredArgs()
  location: variable scope of type StaticScope
src/org/jruby/debug/Context.java:409: error: cannot find symbol
        int count = scope.getRequiredArgs() + scope.getOptionalArgs();
                                                   ^
  symbol:   method getOptionalArgs()
  location: variable scope of type StaticScope
src/org/jruby/debug/Context.java:410: error: cannot find symbol
        if (scope.getRestArg() >= 0) {
                 ^
  symbol:   method getRestArg()
  location: variable scope of type StaticScope
src/org/jruby/debug/DebugEventHook.java:389: error: cannot find symbol
        RubyArray args = runtime.newArray(tCtx.getCurrentScope().getArgValues());
                                                                ^
  symbol:   method getArgValues()
  location: class DynamicScope

I took a look at the DynamicScope and StaticScope classes and there doesn't seem to exist an obvious replacement for the functionality that was previously provided.

JRuby: do not step into block of 'each' alike methods by default

Transferred from http://rubyforge.org/tracker/index.php?func=detail&aid=22176&group_id=3085&atid=11903

Compare debugging of the following snipped under MRI and under JRuby:

  (1..10).each do |i|
    puts i
  end

Likely MRI behaves in the right way, i.e. debugger should not step into the block, until step-in is used, since 'each'
is still just method. Not sure whether fixable or not. Might be dependent on event emitted by JRuby interpreter.

Cf. http://www.netbeans.org/issues/show_bug.cgi?id=134447

Source files with capital ".RB" (sometimes duplicate) getting installed upon gem installation

Currently when the latest version of the gem is installed, under cli/ruby-debug, there's both a processor.rb and a processor.RB, and a commands/source.rb and a commands/source.RB. And the files are actually different.

Under cli/ there's also continue.RB, disassemble.RB, raise.RB with no uncapitalized counterparts.

Apart from not being in this gem's source code, the duplicate files wreak havoc on case-insensitive filesystems (such as OSX's) when used with version control systems.

doesn't work: $ jruby --debug -S rdebug <your-script>

original windows-message in german:
'Der Befehl "ruby" ist entweder falsch geschrieben oder konnte nicht gefunden werden.'

may be in english: 'The command "ruby" is misspelled or could not be found'

Reason:

jruby\lib\ruby\gems\1.8\gems\ruby-debug-0.10.4\bin\rdebug -- line: 115
output = 'ruby -c #{Debugger::PROG_SCRIPT.inspect} 2>&1'

would work if i have any ruby.exe in my (windows-) path.

Works when i change "ruby" to "jruby".

Is this Gem being maintained?

It has been over 3 years since a commit merged to master. There are open PR's and issues spanning years without acknowledgement.

If this gem is no longer maintained, would a maintainer please update README to say so?

tests fail with linecache > 0.43

  1) Failure:
test_linetrace_command(TestTrace) [/Users/jfire/Development/ruby-debug/test/test-trace.rb:27]:
<false> is not true.

  2) Failure:
test_linetrace_plus_command(TestTrace) [/Users/jfire/Development/ruby-debug/test/test-trace.rb:38]:
<false> is not true.

These both pass with linecache 0.43.

@rocky, have you seen this?

Unknown event type: coverage

  • IDEA Ultimate 2018.1
  • JRuby 9.1.17.0
  • Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
  • macOS High Sierra 10.13.5 (17F77)
  • ruby-debug-ide-0.7.0.beta4
  • simplecov-0.16.1
  • rails-5.1.6

I'm attempting to debug my project's integration with the simplecov gem. I have an Run Configuration that invokes a rake task. It will "Run" just fine, but when I attempt to execute the exact same configuration via "Debug", I see the following stack trace. Sure enough, Util.java doesn't have a case statement to handle coverage.

java.lang.IllegalArgumentException: unknown event type: coverage
	at org.jruby.debug.Util.typeForEvent(Util.java:131)
	at org.jruby.debug.DebugEventHook.eventHandler(DebugEventHook.java:97)
	at org.jruby.runtime.EventHook.event(EventHook.java:30)
	at org.jruby.Ruby.callEventHooks(Ruby.java:3121)
	at org.jruby.runtime.ThreadContext.trace(ThreadContext.java:678)
	at org.jruby.ir.interpreter.InterpreterEngine.processBookKeepingOp(InterpreterEngine.java:416)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:100)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:842)
	at org.jruby.Ruby.loadFile(Ruby.java:2903)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:891)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:531)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:963)
	at org.jruby.RubyKernel.require19(RubyKernel.java:956)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require19_DBG.call(RubyKernel$INVOKER$s$1$0$require19_DBG.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:398)
	at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:842)
	at org.jruby.Ruby.loadFile(Ruby.java:2903)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:891)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:531)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:963)
	at org.jruby.RubyKernel.require19(RubyKernel.java:956)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require19_DBG.call(RubyKernel$INVOKER$s$1$0$require19_DBG.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:398)
	at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:84)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:186)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:173)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:842)
	at org.jruby.Ruby.loadFile(Ruby.java:2903)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:891)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:531)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:963)
	at org.jruby.RubyKernel.require19(RubyKernel.java:956)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require19_DBG.call(RubyKernel$INVOKER$s$1$0$require19_DBG.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:398)
	at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:842)
	at org.jruby.Ruby.loadFile(Ruby.java:2903)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.load(LoadService.java:343)
	at org.jruby.RubyKernel.loadCommon(RubyKernel.java:982)
	at org.jruby.RubyKernel.load19(RubyKernel.java:974)
	at org.jruby.RubyKernel$INVOKER$s$0$1$load19_DBG.call(RubyKernel$INVOKER$s$0$1$load19_DBG.gen)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:202)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:84)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:186)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:173)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:150)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:137)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:127)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:344)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:127)
	at org.jruby.runtime.InterpretedIRBlockBody.commonYieldPath(InterpretedIRBlockBody.java:141)
	at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:84)
	at org.jruby.runtime.Block.yieldSpecific(Block.java:134)
	at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:421)
	at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:74)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:112)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:91)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:278)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:79)
	at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:84)
	at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:429)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:150)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:137)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:127)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:344)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:127)
	at org.jruby.runtime.InterpretedIRBlockBody.commonYieldPath(InterpretedIRBlockBody.java:141)
	at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:84)
	at org.jruby.runtime.Block.yieldSpecific(Block.java:134)
	at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:421)
	at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:74)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:112)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:91)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:278)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:79)
	at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:84)
	at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:429)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:112)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:91)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:278)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:79)
	at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:432)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:90)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:222)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:209)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:338)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:183)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:324)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:842)
	at org.jruby.Ruby.loadFile(Ruby.java:2903)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:891)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:531)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:963)
	at org.jruby.RubyKernel.require19(RubyKernel.java:956)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require19_DBG.call(RubyKernel$INVOKER$s$1$0$require19_DBG.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:398)
	at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:842)
	at org.jruby.Ruby.loadFile(Ruby.java:2903)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.load(LoadService.java:343)
	at org.jruby.debug.Debugger.load(Debugger.java:148)
	at org.jruby.debug.RubyDebugger.debug_load(RubyDebugger.java:209)
	at org.jruby.debug.RubyDebugger$INVOKER$s$0$2$debug_load_DBG.call(RubyDebugger$INVOKER$s$0$2$debug_load_DBG.gen)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:278)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:79)
	at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:432)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:84)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:186)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:173)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:842)
	at org.jruby.Ruby.loadFile(Ruby.java:2903)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:243)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.load(LoadService.java:343)
	at org.jruby.RubyKernel.loadCommon(RubyKernel.java:982)
	at org.jruby.RubyKernel.load19(RubyKernel.java:974)
	at org.jruby.RubyKernel$INVOKER$s$0$1$load19_DBG.call(RubyKernel$INVOKER$s$0$1$load19_DBG.gen)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:202)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:107)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:94)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:34)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:847)
	at org.jruby.Ruby.runInterpreter(Ruby.java:851)
	at org.jruby.Ruby.runNormally(Ruby.java:754)
	at org.jruby.Ruby.runNormally(Ruby.java:767)
	at org.jruby.Ruby.runFromMain(Ruby.java:580)
	at org.jruby.Main.doRunFromMain(Main.java:417)
	at org.jruby.Main.internalRun(Main.java:305)
	at org.jruby.Main.run(Main.java:232)
	at org.jruby.Main.main(Main.java:204)

Add rake-compiler dependency

ruby-debug-base, at least for C, needs a dependency on rake-compiler. This is probably a simple thing to do, but it would be nice to get this in the best way.

Is there a way to say it's needed for building, but not if say a architecture-specific gem were used?

Is there a particular release of rake-compiler needed or will all/most releases work?

Requires 'linecache' ('~> 0.46' by ruby-debug-base) which doesn't support ruby 1.8.6

I can't install ruby-debug for ruby 1.8.6 even thought the README says I only need ruby 1.8.4 or higher.

The reason it won't even install? The dependency, via ruby-debug-base, on linecache (version ~> 0.46). That version of linecache requires ruby 1.8.7 or higher.

So, if there's no intent to continue supporting ruby 1.8.6, then the README should probably be updated to say that ruby 1.8.7 or above is required. Otherwise, some work obviously needs to be done for a 1.8.6 user to be able to use the current version of ruby-debug.

remove GPL'd linecache code

Reported here.

The linecache code is for the JRuby version of ruby-debug-base. It should be moved out to a JRuby version of the linecache gem.

Test failure in test_current_context

Unless test/base/load.rb is run in isolation, it causes test failures in test/base/base.rb on MRI:

  1) Failure:
test_current_context(TestRubyDebug) [/Users/jfire/Development/ruby-debug/test/base/base.rb:23]:
<TestRubyDebug> expected but was
<nil>.

Issue installing with Ruby 1.8.7, ruby-debug-base is only found for java platform

> gem install ruby-debug --no-ri --no-rdoc
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: ruby-debug requires ruby-debug-base (~> 0.10.6.0)
> gem install ruby-debug-base -v '~> 0.10.6.0' --no-ri --no-rdoc
ERROR:  Could not find a valid gem 'ruby-debug-base' (~> 0.10.6.0), here is why:
          Found ruby-debug-base (0.10.6), but was for platform java
> uname -r
4.4.0-42-generic
> ruby -v
ruby 1.8.7 (2012-06-29 patchlevel 370) [x86_64-linux]
> bundle -v
Bundler version 1.13.5

So I think the error is Found ruby-debug-base (0.10.6), but was for platform java, but I'm not sure how to resolve this.

warnings

gems/ruby-debug-0.10.6/cli/ruby-debug/commands/list.rb:36: warning: `-' after local variable or literal is interpreted as binary operator
gems/ruby-debug-0.10.6/cli/ruby-debug/commands/list.rb:36: warning: even though it seems like unary operator

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.