Thank you for working on this. I think the hard part will be making run-from-line bullet-proof.
It is not clear what it means to run from a location in a subroutine. It *could* mean something like run from a particular line with the calling context the same as the calling context was the last time it was run. My understanding is that run from line should more properly be called "re-run from line." If the line was not previously run, it would be "start at line". If I had my choice (and a team of programmers who would listen to me and do it my way), I would want a system that kept a record of every line that was executed. The display would be able to be scrolled backwards to select a line. If the line were a subroutine call, it would be possible to show just the call (hiding the actual subroutine lines) or to expand the call (showing the subroutine lines). One could then select the line one wished to run from. Of course, when displaying this, it would be possible to show the values of all registers, subroutine arguments, and other variables as they existed at the time of the line execution. The above takes care of the re-run from line case. The start from line case has the extra quirks that probing and other inputs need to be simulated or have the values otherwise specified. I'm sure that all of this is doable. Most of it is not needed by the typical user (heck, it's not clear the subroutines are needed by the typical user). Unfortunately, given the nature of open software developed by a mixed group of varying interests, it will not be easy to get this done -- certainly not in a single step. It might be possible to do this in multiple phases, though. The first phase would be for someone to step up and build the interpreter support. After that was done, we wold need someone to make the gui work with that support. One downside of what I have in mind is that it would require significantly more CPU resources to implement. That might mean that it would run slowly on ten year old computers with 256Meg of memory. Some of us might have to upgrade to five year old computers :-). Thank you taking this on, Michael. I'm sure that whatever changes you make will be an improvement. Regards, Ken On 4/9/2012 8:13 AM, Michael Haberler wrote: > I've threatened to do this, and since it is slowly moving towards master, I > thought I'd reduce the surprise factor by laying out plan and status: > > The rundown of what it aims to fix: > > • GUI's will be able to highlight source location wherever it comes from: > main.ngc, an oword subroutine, Python code, MDI strings .. > • run-from-line should become more bullet-proof. > • run-from-line will work on arbitrary conditions, not just line numbers; > from locations in subroutines, or depending on variables. > • a new 'Run up to here and pause' GUI option similar to RFL should be easy > to add. > • a call stack display should be easy to do > • the Interpreter's handling of O-words can be firmed up substantially, the > following statements should cause an error message during parsing: > • a 'return' or 'endsub' not within a sub defintion > • a label on 'repeat' which is defined elsewhere > • a label on 'while' which is defińed elsewhere and not referring to a > 'do' > • a label on 'if' defined elsewhere > • a undefined label on 'else' or 'elseif' > • a label on 'else', 'elseif' or 'endif' not pointing to a matching 'if' > • a label on 'break' or 'continue' which does not point to a matching > 'while' or 'do' > • a label on 'endrepeat' or 'endwhile' no referring to a corresponding > 'while' or 'repeat' > > The gory details: http://wiki.linuxcnc.org/cgi-bin/wiki.pl?SourceContext > > This *will* eventually affect code I dont know very well, mainly the GUI's > (note 'affect' != 'break without further changes', or so I hope). > > > I'd appreciate feedback on this. > > - Michael > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Emc-developers mailing list > Emc-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-developers ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers