On Mon, May 29, 2017 at 6:07 PM, Eliot Miranda <eliot.mira...@gmail.com>
wrote:

> Hi Thomas,
>
>
> On May 29, 2017, at 7:41 AM, Ben Coman <b...@openinworld.com> wrote:
>
>
>
> On Mon, May 29, 2017 at 9:34 PM, <tdupr...@ens-paris-saclay.fr> wrote:
>
> [...]

>
>> Here is my example code. Beware, running it will freeze the VM.
>>
>> | program process context debugSession |
>>         program := [1+2].
>>         process := program newProcess.
>>         context := process suspendedContext.
>>         debugSession := process newDebugSessionNamed: 'StepIntoForever'
>> startedAt: context.
>>         [ true ] whileTrue: [ debugSession stepInto ].
>>
>>  [...]


> In particular, your use of stepInto: will soon step into the process
> termination code.  See newProcess.  You have to stop simulating before you
> stop the current process by mistake.
>
>
Yes, I explained yesterday to Thomas that this would end up terminating the
UIProcess where the debugger is running on, instead of terminating the
process that is being debugged. But, it looks like a bug...

It would make sense to me that "Processor activeContext" yields the
debugged context in the simulated code instead of the real active context.
And I believe that this change should not break any existing code.

Actually, thinking a bit more about this, similar problems may happen if we
try to execute in the debugger Semaphore code in the debugger. So probably,
in general terms, the debugger should handle specially all code that messes
up with the Process machinery.

-- 



Guille Polito


Research Engineer

French National Center for Scientific Research - *http://www.cnrs.fr*
<http://www.cnrs.fr>



*Web:* *http://guillep.github.io* <http://guillep.github.io>

*Phone: *+33 06 52 70 66 13

Reply via email to