[squeak-dev] Just another debugger bug - primitive 19
Thiede, Christoph
Christoph.Thiede at student.hpi.uni-potsdam.de
Sun Jan 5 19:33:18 UTC 2020
Hi all, I cannot stop having fun with the debugger & context implementation :D
So here is what I found today ...
Steps to reproduce:
Debug it and step "into" #newProcess :
[self yourself] newProcess
Expected behavior:
You want to see something like this:
[cid:c2902b39-4733-465a-aa91-25b25aac1331]
Actual behavior:
[cid:5d1c5dc0-b65f-43a5-a351-aba397f57327]
Explanation:
See Context >> #doPrimitive:method:receiver:args:
Quote: "Judicious use of primitive 19 (a null primitive that doesn't do anything) prevents the debugger from entering various run-away activities such as spawning a new process, etc. Injudicious use results in the debugger not being able to debug interesting code, such as the debugger itself. Hence use primitive 19 with care :-)"
With respect to this statement, #newProcess (which only *creates* an object), should not really use this primitive, should it? Why isn't this simulation error rather raised at primitive 87 (#resume)? Or rather, why does this error need to be raised at all when, for example, you debug the forking of a process?
In general, can you tell me any example where primitive 19 is necessary indeed? So far I could not find one.
A common scenario in which I stumble upon it is when I try to step "through" the following:
[self halt] fork.
If I disable primitive 19 in #newProcess, this accident does not occur, instead, the new process just runs asynchronously. Feels more intuitive for me.
Even in MVC, everything I could imagine worked fine without the primitive.
Is it possible that primitive 19 comes from an age when the debugging mechanism had not yet evolved to today's capabilities?
Anyway, I would be glad to hear some story about it :-)
Best,
Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200105/89247043/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 18124 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200105/89247043/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 246148 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200105/89247043/attachment-0003.png>
More information about the Squeak-dev
mailing list
|