Need this for DebugThread to be possible. Let me know if I should create a
JIRA for this.
--Chris
Index: /home/ccnelson/workspace/jruby-debug/src/org/jruby/debug/Context.java
===================================================================
--- /home/ccnelson/workspace/jruby-debug/src/org/jruby/debug/Context.java
(revision 266)
+++ /home/ccnelson/workspace/jruby-debug/src/org/jruby/debug/Context.java
(working copy)
@@ -5,8 +5,10 @@
import org.jruby.RubyFixnum;
import org.jruby.RubyHash;
import org.jruby.RubyObject;
+import org.jruby.RubyString;
import org.jruby.runtime.Arity;
import org.jruby.runtime.Block;
+import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.builtin.IRubyObject;
public class Context extends RubyObject {
@@ -236,6 +238,12 @@
}
private IRubyObject context_copy_locals(DebugFrame debug_frame) {
+ RubyHash locals = RubyHash.newHash(getRuntime());
+ DynamicScope scope = (DynamicScope)debug_frame.getInfo().getDynaVars();
+ String[] variableNames = scope.getAllNamesInScope();
+ for (int i = 0; i < variableNames.length; i++) {
+ locals.aset(RubyString.newString(getRuntime(),
variableNames[i]), scope.getValues()[i]);
+ }
// ID *tbl;
// int n, i;
// struct SCOPE *scope;
@@ -266,8 +274,7 @@
// }
// return hash;
System.err.println("MK> " + new Exception().getStackTrace()[0] + "
called...." + ", " + System.currentTimeMillis());
- System.err.println("MK> IMPLEMENT ME");
- return RubyHash.newHash(getRuntime());
+ return locals;
}
Index:
/home/ccnelson/workspace/jruby-debug/src/org/jruby/debug/DebugEventHook.java
===================================================================
---
/home/ccnelson/workspace/jruby-debug/src/org/jruby/debug/DebugEventHook.java
(revision 266)
+++
/home/ccnelson/workspace/jruby-debug/src/org/jruby/debug/DebugEventHook.java
(working copy)
@@ -320,7 +320,7 @@
debugContext.increaseStackSize();
DebugFrame debugFrame = new DebugFrame();
- debugFrame.setArgc(tCtx.getFrameArgs().length);
+ //debugFrame.setArgc(tCtx.getFrameArgs().length);
debugFrame.setFile(file);
debugFrame.setLine(line);
debugFrame.setBinding(binding);
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email