I need access to the Spin stack pointer.
Phil Pilgrim (PhiPi)
Posts: 23,514
I have a Spin program which, I suspect, is having some deep (pardon the double entendre) stack issues, and I'd like to see what's going on. AFAIK, the Spin stack pointer is inaccessible. Is there an alternate Spin interpreter available that might make it easier to probe the stack for debugging purposes?
Thanks,
-Phil
Thanks,
-Phil
Comments
-Phil
IIRC, You could just print the address of result within a method to get the current stack frame start.
If that doesn't help I do have a version of an interpreter that traps this kind of stuff.
-Phil
-Phil
If your program doesn't use any pin inputs or counters you could run it under SpinSim and list out all the instructions that get executed. SpinSim is located at http://forums.parallax.com/showthread.php?127976-Spin-Simulator .
Dave
-Phil
I haven't thought much about driving the input pins, but I think I'll need to add that feature at some point. Gear has some way to add a plugin or a stimulus file. I haven't looked into it, so I don't know how that works. A stimulus file would be easy to add. Another method would be to use a cog to simulate an external device, and have it write certain pins, which are read by another cog. That would be easy to do also.
Dave
-Phil