Yes...

I was guilty of harvesting that for 3.7 or 3.6... (Squeak that is).

In the Old Browser, you have an entry "toggle break on entry". What this
does is that it compiles a new version of the method (it uses a bit a strange
way of doing that using the old AST...). This version has a self break at the 
beginning,
yet points to the old source so you don't see it.

Now the BreakPointmanager can remove all BreakPoints, all for a class and 
things like
that easily. it knows if there is one. CompiledMethod has #hasBreakpoint. 
Setting breakpoints
does not invalidate code (as opposed to self halt).

So there is everything to make a nice UI for it...

The model is a bit limited. Only break on entry, no probes and so on. But it 
works.
The limitations are mostly because everything else is hard to do with the bad
model we have in the current system of doing structural reflection below method
granularity... 

We should add a nice UI for it *and* soon we can do oh so much better much 
easier :-)

        Marcus


On Aug 17, 2010, at 8:56 PM, Stéphane Ducasse wrote:

>> 
>> In CodeHolder apparently there is support for breakpoint.
>> Does anybody know how this works?
>> Stef
>> 
>> toggleBreakOnEntry
>>      "Install or uninstall a halt-on-entry breakpoint"
>> 
>>      | selectedMethod |
>>      self selectedClassOrMetaClass isNil ifTrue:[^self].
>>      selectedMethod := self selectedClassOrMetaClass >> self 
>> selectedMessageName.
>>      selectedMethod hasBreakpoint
>>              ifTrue:
>>                      [BreakpointManager unInstall: selectedMethod]
>>              ifFalse:
>>                      [BreakpointManager 
>>                              installInClass: self selectedClassOrMetaClass
>>                              selector: self selectedMessageName].
>> 
>> 
>> 
> 
> 
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
Marcus Denker  -- http://www.marcusdenker.de
INRIA Lille -- Nord Europe. Team RMoD.


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to