Hi again,

I'm going to merged support of next+ and step+ into ruby-debug-ide (will be 0.1.3). This is a new feature added by Kent into ruby-debug 0.9.1:

http://www.datanoise.com/articles/2007/4/3/ruby-debug-version-0-9-1-has-been-released

I've also notice that RubyDebugCommandFactory#createStepReturn uses 'next' command. It should use 'finish' command instead I believe. But maybe I've missed some hidden purpose.

Attaching possible patch containing createStepReturn fix as well as possible next+/step+ utilization.

So let me know if you commit the fix to createStepReturn into RDT so I may proceed with next+/step+ merge.

Thanks,
        m.

Index: src/org/rubypeople/rdt/internal/debug/core/RubyDebugCommandFactory.java
===================================================================
--- src/org/rubypeople/rdt/internal/debug/core/RubyDebugCommandFactory.java     
(revision 2389)
+++ src/org/rubypeople/rdt/internal/debug/core/RubyDebugCommandFactory.java     
(working copy)
@@ -24,14 +24,22 @@
                return "frame " + frame.getIndex() + " ; next" ;
        }
 
+       public String createForcedStepOver(RubyStackFrame frame) {
+               return "frame " + frame.getIndex() + " ; next+";
+       }
+
        public String createStepReturn(RubyStackFrame frame) {
-               return  "frame " + frame.getIndex() + " ; next 1 " + 
(frame.getIndex() + 1)  ;
+               return "frame " + frame.getIndex() + "; finish";
        }
 
        public String createStepInto(RubyStackFrame frame) {
                return "frame " + frame.getIndex() + " ; step";
        }
 
+       public String createForcedStepInto(RubyStackFrame frame) {
+               return "frame " + frame.getIndex() + " ; step+";
+       }
+
        public String createReadThreads() {
                return "th l";
        }
Index: src/org/rubypeople/rdt/internal/debug/core/ICommandFactory.java
===================================================================
--- src/org/rubypeople/rdt/internal/debug/core/ICommandFactory.java     
(revision 2389)
+++ src/org/rubypeople/rdt/internal/debug/core/ICommandFactory.java     
(working copy)
@@ -16,10 +16,14 @@
 
        public String createStepOver(RubyStackFrame stackFrame);
 
+       public String createForcedStepOver(RubyStackFrame stackFrame);
+
        public String createStepReturn(RubyStackFrame stackFrame);
 
        public String createStepInto(RubyStackFrame stackFrame);
 
+       public String createForcedStepInto(RubyStackFrame stackFrame);
+
        public String createReadThreads();
        
        public String createThreadStop(RubyThread thread);
@@ -37,4 +41,4 @@
        public String createCatchOn(IBreakpoint breakpoint) throws 
CoreException;
 
        public String createLoad(String filename);
-}
\ No newline at end of file
+}
Index: 
src/org/rubypeople/rdt/internal/debug/core/ClassicDebuggerCommandFactory.java
===================================================================
--- 
src/org/rubypeople/rdt/internal/debug/core/ClassicDebuggerCommandFactory.java   
    (revision 2389)
+++ 
src/org/rubypeople/rdt/internal/debug/core/ClassicDebuggerCommandFactory.java   
    (working copy)
@@ -24,6 +24,11 @@
                return "th " + ((RubyThread) stackFrame.getThread()).getId() + 
" ; next";
        }
 
+       public String createForcedStepOver(RubyStackFrame stackFrame) {
+               // not supported by Classic Debugger
+               return createStepOver(stackFrame);
+       }
+
        public String createStepReturn(RubyStackFrame stackFrame) {
                return "th " + ((RubyThread) stackFrame.getThread()).getId() + 
" ; next " + (stackFrame.getLineNumber() + 1);
        }
@@ -32,6 +37,11 @@
                return "th " + ((RubyThread) stackFrame.getThread()).getId() + 
" ; step";
        }
 
+       public String createForcedStepInto(RubyStackFrame stackFrame) {
+               // not supported by Classic Debugger
+               return createStepInto(stackFrame);
+       }
+
        public String createReadThreads() {
                return "th l";
        }
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rubyeclipse-development mailing list
Rubyeclipse-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rubyeclipse-development

Reply via email to