sfk@otter.hpl.hp.com (Steve Knight) writes:
> Date: 26 Mar 93 14:29:59 GMT
> Organization: Hewlett-Packard Laboratories, Bristol, UK.
>
> Following on from Luc's posting about interrogating the state of processes,
> I'd like to hear suggestions for access/update procedures on processes. If
> there looks like a coherent set we should consider putting it into th Pop9x
> work.
I think that all you need really is an alternative to runproc,
called, e.g. evalproc(Process,Procedure), which takes a process and
a procedure, and runs Procedure inside Process in such a way that
when the Procedure returns so does evalproc.
This could be done by appending to the control stack a stack frame
for a procedure defined as roughly
define run_inside_process(Procedure);
lvars procedure Procedure;
Procedure();
exitfrom(evalproc)
enddefine;
then Procedure, when it runs, can interrogate the control stack,
the user stack, the values of variables, etc. It could even do
exitfrom(caller(1))
which would, in effect, resume the process?
Of course, there may be more efficient ways of finding what
the state of the process is, but that would require desinging a lot
of (messy?) procedures specially for the purpose.
Aaron
--
Aaron Sloman,
School of Computer Science, The University of Birmingham, B15 2TT, England
EMAIL A.Sloman@cs.bham.ac.uk OR A.Sloman@bham.ac.uk
Phone: +44-(0)21-414-3711 Fax: +44-(0)21-414-4281
|