On Sat, Jan 28, 2012 at 2:23 PM, Andreas Raab <andreas.raab@gmx.de> wrote:

On 1/28/2012 23:09, Igor Stasenko wrote:

Another reason why we need such prim: have you tried to debug a debugger?
You can't , because there is a simulation guard:

       <primitive: 19>  "Simulation guard"
       "If successful, push result and return resuming context,
               else ^ PrimitiveFailToken"
       (primitiveIndex = 19) ifTrue:
               [Smalltalk tools
                       debugContext: self
                       label:'Code simulation error'
                       contents: nil].

This is because you cannot instruct VM that the code you stepping over
should not escape out of your control.

Sorry, but that's not what the simulation guard is for. Historically the VM would just crash when trying to simulate certain methods (like the above). So I put in simulation guards to prevent VM crashes. If the VM can simulate these methods, then you can just take them out.

Quite right.  I ripped it out of the Qwaq/Teleplace codebase without ill-effect.  I need to do that for Squeak.  Thanks for the reminder.   Simply remove the <primitive: 19> nonsense from doPrimitive:. 


Cheers,
 - Andreas




--
best,
Eliot