Login  Register

Re: stepping over non local return in a protected block

Posted by Christoph Thiede on Apr 19, 2021; 10:50am
URL: https://forum.world.st/stepping-over-non-local-return-in-a-protected-block-tp5128777p5128847.html

Hi all,


thanks for reporting. I think that we see two overlapping effects here:


First, #runUntilErrorOrReturnFrom: (which is called eventually by Debugger >> #stepOver) does not support Context >> #aboutToReturn:through: correctly, still. I'd like to refer to this thread again: http://forum.world.st/BUG-REGRESSION-while-debugging-Generator-gt-gt-nextPut-td5108125.html#a5127567


But the fact that the guard contexts are not removed again should not lead to a cannot return situation. Instead, I would rather have expected that the UI process would be terminated. But somehow, the termination in BlockClosure >> #newProcess fails. I observed that primitive 88 in Process >> #suspend fails so the execution continues right from the bottom context of the process. I'm not sure why primitiveSuspend fails here. Might this be related to the changes in termination logic? Jaromir? :-)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 19. April 2021 09:54:44
An: squeak-dev
Betreff: Re: [squeak-dev] stepping over non local return in a protected block
 
Hmm... at least you get a debugger. In Squeak 5.3, you are not able to put a "self halt" into that event handler in test03EventHandler. ^__^

Yet, I noticed that when stepping over that "^ self dispatchEvent:..." in #dispatchMouseDown:with:, a second debugger appears. That's a bug. The expected behavior would be that the same debugger shows the "halt." I think.



Best,
Marcel

Am 17.04.2021 10:58:06 schrieb Jaromir Matas <[hidden email]>:

Hi Nicolas,


Nicolas Cellier wrote
> When debugging things like this:
>
> [^2] ensure: [Transcript cr; show: 'done'].
>
> if we step into the protected block [^2], then step over ^2, we
> incorrectly get a BlockCannotReturn.

Hmm, that's the bug that plagued #terminate and caused unwind errors... I
didn't fully realize then; I simply avoided it by eliminating the simulation
code from #terminate :) This behavior happens when the VM calls
#aboutToReturn:through: and the Debugger executes #stepOver it (or over
#return:through: or #resume:through:) - sorry if I'm stating the obvious;
unfortunately I have negligible knowledge of the Debugger. I'm really
looking forward to seeing a solution!
Thanks,
best,



-----
^[^ Jaromir
--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html



Carpe Squeak!