Process local variable and debugging

Tim Rowledge tim at sumeru.stanford.edu
Fri Feb 8 01:53:25 UTC 2002


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


> Anyway, here's a quick hack: Have "Processor activeProcess" return the
> process being debugged, if it is invoked from within the debugger.  I
> don't know how, but, isn't that a reasonable thing to do?  Mentally,
> when you do "step" in the debugger, you are resuming the process for
> just one step, even if it's not implemented that way.
Hey, you're supposed to have finished that paragraph with "..and here's
some code I prepared earlier" !

One of the problems is working out from some random context _which_
Process is its owner. Thinking about this lead me to imagine a really
rather evil possibility for providing a sort-of-per-Process namespace.

Use
	[:dict| blah-blah] newProcesssWith:
instead of
	[foody-doo] newProcess
This sets a block temp in the 'root' context. We can find the root context
reasonably quickly by running up the sender chain - just like the exception
handlers do already. Use
	(thisContext rootContext tempAt:1) at: #name
preferably with some prettying up - maybe thisContext rootVarNamed:
#name - or even some compiler trickery to hide it.

At least that would work the same under the debugger. I think...

Anybody ever tried this?

tim

-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful random insult:- Sharp, like stone in river.  Swift, like tree through forest.




More information about the Squeak-dev mailing list