Commits

Anonymous committed 45ca35e

- Preparing to add variables to frames.
- Fixed swank tests.

  • Participants
  • Parent commits 747192b

Comments (0)

Files changed (4)

File src/org/lispdev/swank/LispStackFrame.java

 
 public class LispStackFrame extends LispDebugElement implements IStackFrame
 {
+  /**
+   * index of the frame in SwankDebugInfo
+   */
+  private final int index;
   private final String name;
   private final LispThread thread;
 
-  public LispStackFrame(LispThread thread, String name)
+  public LispStackFrame(LispThread thread, String name, int index)
   {
     super((LispDebugTarget)thread.getDebugTarget());
     this.thread = thread;
     this.name = name;
+    this.index = index;
   }
 
   @Override

File src/org/lispdev/swank/LispThread.java

       IStackFrame[] res = new IStackFrame[debugInfo.frames.size()];
       for( int i = 0; i < res.length; ++i )
       {
-        res[i] = new LispStackFrame(this, debugInfo.frames.get(i));
+        res[i] = new LispStackFrame(this, debugInfo.frames.get(i), i);
       }
       return res;
     }

File src/org/lispdev/swank/LocalLispImplementation.java

       Map env, int port, boolean startReplThread)
   {
     super(port);
-    commandLine = new String[3+cmdParams.size()];
+    final int cmdSize = (cmdParams == null ? 0 : cmdParams.size());
+    commandLine = new String[3+cmdSize];
     commandLine[0] = exePath;
     commandLine[1] = "--load";
     commandLine[2] = (swankDir + File.separator + "swank-loader.lisp")
         .replace(File.separator+File.separator, File.separator);
-    for( int i = 0; i < cmdParams.size(); ++i )
+    for( int i = 0; i < cmdSize; ++i )
     {
       commandLine[i+3] = String.valueOf(cmdParams.get(i));
     }

File src/org/lispdev/swank/SwankInterfaceTest.java

 
   public SwankInterfaceTest()
   {
-    super(null,null,null);
+    super(null,
+        new LocalLispImplementation("tt", "tt", null, null, 1, true),null);
   }
 
   private static SwankInterface startSBCL1Swank()
   Display input pipe closed.
 
    */
-    @Test
+  @Test
   public void test_debugStep()
   {
     String res = si.sendEvalAndGrab(
         String thread = info.get(1).value;
         String level = info.get(2).value;
 
-        // LispNode desc = info.get(3);
-        // LispNode options = info.get(4);
-        // LispNode backtrace = info.get(5);
-
         si.sendDebug("1", level, thread, callBack);
       }
     };