ruby-debug-ide 0.4.18 → 0.4.21.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ruby-debug-ide/command.rb +1 -12
- data/lib/ruby-debug-ide/commands/pause.rb +6 -5
- data/lib/ruby-debug-ide/commands/threads.rb +25 -0
- data/lib/ruby-debug-ide/commands/variables.rb +2 -2
- data/lib/ruby-debug-ide/ide_processor.rb +9 -2
- data/lib/ruby-debug-ide/multiprocess/monkey.rb +7 -5
- data/lib/ruby-debug-ide/version.rb +2 -2
- metadata +31 -29
| @@ -136,19 +136,8 @@ module Debugger | |
| 136 136 | 
             
                  end
         | 
| 137 137 | 
             
                end
         | 
| 138 138 |  | 
| 139 | 
            -
                def hbinding(hash)
         | 
| 140 | 
            -
                  code = hash.keys.map{|k| "#{k} = hash['#{k}']"}.join(';') + ';binding'
         | 
| 141 | 
            -
                  if obj = @state.context.frame_self(@state.frame_pos)
         | 
| 142 | 
            -
                    obj.instance_eval code
         | 
| 143 | 
            -
                  else
         | 
| 144 | 
            -
                    eval code
         | 
| 145 | 
            -
                  end
         | 
| 146 | 
            -
                end
         | 
| 147 | 
            -
                private :hbinding
         | 
| 148 | 
            -
                
         | 
| 149 139 | 
             
                def get_binding
         | 
| 150 | 
            -
                   | 
| 151 | 
            -
                  binding || hbinding(@state.context.frame_locals(@state.frame_pos))
         | 
| 140 | 
            +
                  @state.context.frame_binding(@state.frame_pos)
         | 
| 152 141 | 
             
                end
         | 
| 153 142 |  | 
| 154 143 | 
             
                def line_at(file, line)
         | 
| @@ -9,12 +9,13 @@ module Debugger | |
| 9 9 | 
             
                end
         | 
| 10 10 |  | 
| 11 11 | 
             
                def execute
         | 
| 12 | 
            -
                   | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 12 | 
            +
                  Debugger.contexts.each do |c|
         | 
| 13 | 
            +
                    unless c.respond_to?(:pause)
         | 
| 14 | 
            +
                      print_msg "Not implemented"
         | 
| 15 | 
            +
                      return
         | 
| 16 | 
            +
                    end
         | 
| 17 | 
            +
                    c.pause
         | 
| 16 18 | 
             
                  end
         | 
| 17 | 
            -
                  c.pause
         | 
| 18 19 | 
             
                end
         | 
| 19 20 |  | 
| 20 21 | 
             
                class << self
         | 
| @@ -59,6 +59,31 @@ module Debugger | |
| 59 59 | 
             
                end
         | 
| 60 60 | 
             
              end
         | 
| 61 61 |  | 
| 62 | 
            +
              class ThreadInspectCommand < Command # :nodoc:
         | 
| 63 | 
            +
                self.control = true
         | 
| 64 | 
            +
                self.need_context = true
         | 
| 65 | 
            +
             | 
| 66 | 
            +
                def regexp
         | 
| 67 | 
            +
                  /^\s*th(?:read)?\s+in(?:spect)?\s+(\d+)\s*$/
         | 
| 68 | 
            +
                end
         | 
| 69 | 
            +
             | 
| 70 | 
            +
                def execute
         | 
| 71 | 
            +
                  @state.context = get_context(@match[1].to_i)      
         | 
| 72 | 
            +
                end
         | 
| 73 | 
            +
             | 
| 74 | 
            +
                class << self
         | 
| 75 | 
            +
                  def help_command
         | 
| 76 | 
            +
                    'thread'
         | 
| 77 | 
            +
                  end
         | 
| 78 | 
            +
             | 
| 79 | 
            +
                  def help(cmd)
         | 
| 80 | 
            +
                    %{
         | 
| 81 | 
            +
                      th[read] in[spect] <nnn>\tswitch thread context to nnn but don't resume any threads
         | 
| 82 | 
            +
                    }
         | 
| 83 | 
            +
                  end
         | 
| 84 | 
            +
                end
         | 
| 85 | 
            +
              end
         | 
| 86 | 
            +
             | 
| 62 87 | 
             
              class ThreadStopCommand < Command # :nodoc:
         | 
| 63 88 | 
             
                self.control = true
         | 
| 64 89 | 
             
                self.need_context = true
         | 
| @@ -86,7 +86,7 @@ module Debugger | |
| 86 86 | 
             
                      # instance variables
         | 
| 87 87 | 
             
                      kind = 'instance'
         | 
| 88 88 | 
             
                      inst_vars = obj.instance_variables
         | 
| 89 | 
            -
                      instance_binding = obj.instance_eval{binding()}
         | 
| 89 | 
            +
                      instance_binding = obj.instance_eval{::Kernel.binding()}
         | 
| 90 90 | 
             
                      # print self at top position
         | 
| 91 91 | 
             
                      print_variable('self', debug_eval('self', instance_binding), kind) if inst_vars.include?('self')
         | 
| 92 92 | 
             
                      inst_vars.sort.each do |var|
         | 
| @@ -94,7 +94,7 @@ module Debugger | |
| 94 94 | 
             
                      end
         | 
| 95 95 |  | 
| 96 96 | 
             
                      # class variables
         | 
| 97 | 
            -
                      class_binding = obj.class.class_eval('binding()')
         | 
| 97 | 
            +
                      class_binding = obj.class.class_eval('::Kernel.binding()')
         | 
| 98 98 | 
             
                      obj.class.class_variables.sort.each do |var|
         | 
| 99 99 | 
             
                        print_variable(var, debug_eval(var, class_binding), 'class')
         | 
| 100 100 | 
             
                      end
         | 
| @@ -42,9 +42,10 @@ module Debugger | |
| 42 42 | 
             
                          end
         | 
| 43 43 | 
             
                        else
         | 
| 44 44 | 
             
                          @printer.print_msg "Unknown command: #{input}"
         | 
| 45 | 
            -
                        end
         | 
| 45 | 
            +
                        end            
         | 
| 46 46 | 
             
                      end
         | 
| 47 47 | 
             
                    end
         | 
| 48 | 
            +
                    state.restore_context
         | 
| 48 49 | 
             
                  end
         | 
| 49 50 | 
             
                rescue IOError, Errno::EPIPE
         | 
| 50 51 | 
             
                  @printer.print_error "INTERNAL ERROR!!! #{$!}\n" rescue nil
         | 
| @@ -105,7 +106,8 @@ module Debugger | |
| 105 106 |  | 
| 106 107 | 
             
              class State # :nodoc:
         | 
| 107 108 |  | 
| 108 | 
            -
                attr_accessor :context, : | 
| 109 | 
            +
                attr_accessor :context, :original_context
         | 
| 110 | 
            +
                attr_accessor :file, :line, :binding
         | 
| 109 111 | 
             
                attr_accessor :frame_pos, :previous_line
         | 
| 110 112 | 
             
                attr_accessor :interface
         | 
| 111 113 |  | 
| @@ -114,6 +116,7 @@ module Debugger | |
| 114 116 | 
             
                  @previous_line = nil
         | 
| 115 117 | 
             
                  @proceed = false
         | 
| 116 118 | 
             
                  yield self
         | 
| 119 | 
            +
                  @original_context = context
         | 
| 117 120 | 
             
                end
         | 
| 118 121 |  | 
| 119 122 | 
             
                def print(*args)
         | 
| @@ -127,6 +130,10 @@ module Debugger | |
| 127 130 | 
             
                def proceed
         | 
| 128 131 | 
             
                  @proceed = true
         | 
| 129 132 | 
             
                end
         | 
| 133 | 
            +
             | 
| 134 | 
            +
                def restore_context
         | 
| 135 | 
            +
                  context = @original_context
         | 
| 136 | 
            +
                end
         | 
| 130 137 | 
             
              end
         | 
| 131 138 |  | 
| 132 139 | 
             
              class ControlState # :nodoc:
         | 
| @@ -1,9 +1,10 @@ | |
| 1 1 | 
             
            module Debugger
         | 
| 2 2 | 
             
              module MultiProcess
         | 
| 3 | 
            -
                def self.create_mp_fork
         | 
| 3 | 
            +
                def self.create_mp_fork(private=false)
         | 
| 4 4 | 
             
                  %Q{
         | 
| 5 5 | 
             
                    alias pre_debugger_fork fork
         | 
| 6 6 |  | 
| 7 | 
            +
                    #{private ? "private" : ""}
         | 
| 7 8 | 
             
                    def fork(*args)
         | 
| 8 9 | 
             
                      if block_given?
         | 
| 9 10 | 
             
                        return pre_debugger_fork{Debugger::MultiProcess::pre_child; yield}
         | 
| @@ -15,10 +16,11 @@ module Debugger | |
| 15 16 | 
             
                  }
         | 
| 16 17 | 
             
                end
         | 
| 17 18 |  | 
| 18 | 
            -
                def self.create_mp_exec
         | 
| 19 | 
            +
                def self.create_mp_exec(private=false)
         | 
| 19 20 | 
             
                  %Q{
         | 
| 20 21 | 
             
                    alias pre_debugger_exec exec
         | 
| 21 | 
            -
             | 
| 22 | 
            +
                    
         | 
| 23 | 
            +
                    #{private ? "private" : ""}
         | 
| 22 24 | 
             
                    def exec(*args)
         | 
| 23 25 | 
             
                      Debugger.interface.close
         | 
| 24 26 | 
             
                      pre_debugger_exec(*args)
         | 
| @@ -33,8 +35,8 @@ module Kernel | |
| 33 35 | 
             
                module_eval Debugger::MultiProcess.create_mp_fork
         | 
| 34 36 | 
             
                module_eval Debugger::MultiProcess.create_mp_exec
         | 
| 35 37 | 
             
              end
         | 
| 36 | 
            -
              module_eval Debugger::MultiProcess.create_mp_fork
         | 
| 37 | 
            -
              module_eval Debugger::MultiProcess.create_mp_exec
         | 
| 38 | 
            +
              module_eval Debugger::MultiProcess.create_mp_fork(true)
         | 
| 39 | 
            +
              module_eval Debugger::MultiProcess.create_mp_exec(true)
         | 
| 38 40 | 
             
            end
         | 
| 39 41 |  | 
| 40 42 | 
             
            module Process
         | 
| @@ -1,3 +1,3 @@ | |
| 1 1 | 
             
            module Debugger
         | 
| 2 | 
            -
              IDE_VERSION='0.4. | 
| 3 | 
            -
            end
         | 
| 2 | 
            +
              IDE_VERSION='0.4.21.pre1'
         | 
| 3 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,34 +1,36 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: ruby-debug-ide
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.4. | 
| 5 | 
            -
              prerelease:
         | 
| 4 | 
            +
              version: 0.4.21.pre1
         | 
| 5 | 
            +
              prerelease: 7
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| 8 8 | 
             
            - Markus Barchfeld, Martin Krauskopf, Mark Moseley, JetBrains RubyMine Team
         | 
| 9 | 
            -
            autorequire:
         | 
| 9 | 
            +
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2013- | 
| 12 | 
            +
            date: 2013-09-19 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: rake
         | 
| 16 | 
            -
               | 
| 16 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 17 | 
            +
                none: false
         | 
| 17 18 | 
             
                requirements:
         | 
| 18 | 
            -
                - - '>='
         | 
| 19 | 
            +
                - - ! '>='
         | 
| 19 20 | 
             
                  - !ruby/object:Gem::Version
         | 
| 20 21 | 
             
                    version: 0.8.1
         | 
| 22 | 
            +
              type: :runtime
         | 
| 23 | 
            +
              prerelease: false
         | 
| 24 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 21 25 | 
             
                none: false
         | 
| 22 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 23 26 | 
             
                requirements:
         | 
| 24 | 
            -
                - - '>='
         | 
| 27 | 
            +
                - - ! '>='
         | 
| 25 28 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 29 | 
             
                    version: 0.8.1
         | 
| 27 | 
            -
             | 
| 28 | 
            -
               | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
              An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine.
         | 
| 30 | 
            +
            description: ! 'An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans
         | 
| 31 | 
            +
              and RubyMine.
         | 
| 32 | 
            +
             | 
| 33 | 
            +
            '
         | 
| 32 34 | 
             
            email: rubymine-feedback@jetbrains.com
         | 
| 33 35 | 
             
            executables:
         | 
| 34 36 | 
             
            - rdebug-ide
         | 
| @@ -45,15 +47,7 @@ files: | |
| 45 47 | 
             
            - Gemfile
         | 
| 46 48 | 
             
            - ruby-debug-ide.gemspec
         | 
| 47 49 | 
             
            - bin/rdebug-ide
         | 
| 48 | 
            -
            - lib/ruby-debug-ide.rb
         | 
| 49 50 | 
             
            - lib/ruby-debug-ide/command.rb
         | 
| 50 | 
            -
            - lib/ruby-debug-ide/event_processor.rb
         | 
| 51 | 
            -
            - lib/ruby-debug-ide/helper.rb
         | 
| 52 | 
            -
            - lib/ruby-debug-ide/ide_processor.rb
         | 
| 53 | 
            -
            - lib/ruby-debug-ide/interface.rb
         | 
| 54 | 
            -
            - lib/ruby-debug-ide/multiprocess.rb
         | 
| 55 | 
            -
            - lib/ruby-debug-ide/version.rb
         | 
| 56 | 
            -
            - lib/ruby-debug-ide/xml_printer.rb
         | 
| 57 51 | 
             
            - lib/ruby-debug-ide/commands/breakpoints.rb
         | 
| 58 52 | 
             
            - lib/ruby-debug-ide/commands/catchpoint.rb
         | 
| 59 53 | 
             
            - lib/ruby-debug-ide/commands/condition.rb
         | 
| @@ -69,31 +63,39 @@ files: | |
| 69 63 | 
             
            - lib/ruby-debug-ide/commands/stepping.rb
         | 
| 70 64 | 
             
            - lib/ruby-debug-ide/commands/threads.rb
         | 
| 71 65 | 
             
            - lib/ruby-debug-ide/commands/variables.rb
         | 
| 66 | 
            +
            - lib/ruby-debug-ide/event_processor.rb
         | 
| 67 | 
            +
            - lib/ruby-debug-ide/helper.rb
         | 
| 68 | 
            +
            - lib/ruby-debug-ide/ide_processor.rb
         | 
| 69 | 
            +
            - lib/ruby-debug-ide/interface.rb
         | 
| 72 70 | 
             
            - lib/ruby-debug-ide/multiprocess/monkey.rb
         | 
| 73 71 | 
             
            - lib/ruby-debug-ide/multiprocess/pre_child.rb
         | 
| 74 72 | 
             
            - lib/ruby-debug-ide/multiprocess/starter.rb
         | 
| 73 | 
            +
            - lib/ruby-debug-ide/multiprocess.rb
         | 
| 74 | 
            +
            - lib/ruby-debug-ide/version.rb
         | 
| 75 | 
            +
            - lib/ruby-debug-ide/xml_printer.rb
         | 
| 76 | 
            +
            - lib/ruby-debug-ide.rb
         | 
| 75 77 | 
             
            homepage: https://github.com/ruby-debug/ruby-debug-ide
         | 
| 76 78 | 
             
            licenses: []
         | 
| 77 | 
            -
            post_install_message:
         | 
| 79 | 
            +
            post_install_message: 
         | 
| 78 80 | 
             
            rdoc_options: []
         | 
| 79 81 | 
             
            require_paths:
         | 
| 80 82 | 
             
            - lib
         | 
| 81 83 | 
             
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 84 | 
            +
              none: false
         | 
| 82 85 | 
             
              requirements:
         | 
| 83 | 
            -
              - - '>='
         | 
| 86 | 
            +
              - - ! '>='
         | 
| 84 87 | 
             
                - !ruby/object:Gem::Version
         | 
| 85 88 | 
             
                  version: 1.8.2
         | 
| 86 | 
            -
              none: false
         | 
| 87 89 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 90 | 
            +
              none: false
         | 
| 88 91 | 
             
              requirements:
         | 
| 89 | 
            -
              - - ' | 
| 92 | 
            +
              - - ! '>'
         | 
| 90 93 | 
             
                - !ruby/object:Gem::Version
         | 
| 91 | 
            -
                  version:  | 
| 92 | 
            -
              none: false
         | 
| 94 | 
            +
                  version: 1.3.1
         | 
| 93 95 | 
             
            requirements: []
         | 
| 94 96 | 
             
            rubyforge_project: debug-commons
         | 
| 95 | 
            -
            rubygems_version: 1.8. | 
| 96 | 
            -
            signing_key:
         | 
| 97 | 
            +
            rubygems_version: 1.8.25
         | 
| 98 | 
            +
            signing_key: 
         | 
| 97 99 | 
             
            specification_version: 3
         | 
| 98 100 | 
             
            summary: IDE interface for ruby-debug.
         | 
| 99 101 | 
             
            test_files: []
         |