Process local variable and debugging

Tim Rowledge tim at sumeru.stanford.edu
Mon Feb 11 21:25:48 UTC 2002


"Lex Spoon" <lex at cc.gatech.edu> is claimed by the authorities to have written:

> "Stephen Pair" <spair at advantive.com> wrote:
> > Wouldn't it be better to clone the process local variables into the
> > process used for debugging rather than hack #activeProcess (which I
> > think would create more problems than it solves)?
> > 
> 
> I dunno, if you are debugging some code that does "Processor
> activeProcess", then what process should it get?  I think the "hack" is
> desirable anyway.
This is one of those places where the original intent needs to be
divined, which is always tricky absent a decent DWIM instruction.

I was thinking of working around the problem by making it more of the
form
	thisContext process
where the process message needs to run up the stack and then work out
which process owns the root context. This seems like it can also get
stuck in some interesting areas, like what happens if you decide to add
an instvar to Process to point to the rootcontext (so you can quickly
scan all proceses to find the owner) and someone has done som
coroutining thus making the context chains all mixed up? Ouch. Still at
least using 'thisContext process' makes sure you get the same answer in
and out of the debugger. Probably....

> 
> Also, remember that the debugger might want to use process-local
> variables, too.  It shouldn't really be inheritting the debugged
> process's variables, should it?
Perhaps 'inheriting' is the wrong word here; maybe 'connecting to' would
be better?

tim

-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful random insult:- Has a random memory fault.




More information about the Squeak-dev mailing list