debugger? (was: Re: prototypes vs classes was: Re: Sun's
stes at mundivia.es
Fri Oct 16 10:38:58 UTC 1998
On Thu, 15 Oct 1998, Dan Ingalls wrote:
> 1. Execute 'self halt', or hit cmd-. to get into a debugger.
> 2. Select some method with temps on the stack.
> Let us assume one is called 'zort'.
I see some methods with temp variables like 't1' etc.
There's no zort.
> 3. In the code pane or bottomRight inspector pane, type and execute...
> self halt. zort + 3
> This will bring up a second debugger.
You mean: self halt. t1 + 3
> 4. Select the method 'DoItIn:' on the stack. This is what was compiled from what you typed. It will be decompiled, and should look very much like:
> DoItIn: t1
> self halt.
> ^ (t1 tempAt: 1) + 3
> 5. In this situation, the simple variable reference (zort) is compiled to
> a message (t1 tempAt: 1) for the purpose of accessing a remote
> temporary variable. You can probably guess the result of doing...
> self halt. zort := 3
That would be something like ^ t1 tempAt: 1 put: 3.
Ah, now I see! The 't1' that is argument of the DoItIn: message is not
related to the 't1' of the original method.
O.K., now I see why you call the original temporary variable "zort". I
was sort of confused by the "zort".
Thanks for explaining this.
More information about the Squeak-dev