Hi, 

it may not be actively maintained but Phantom has recently been ported
to Pharo 6/6.1 https://github.com/InesSosa95/PHANtom 

You could also use Reflectivity (look for MetaLink class), which should
not be hard to understand if you are familiar with aspects (although
that is not aspects). 

For example, if you wanted to trace the receivers and parameters of a
method named #mWithArg1:withArg2:withArg3: in class C, you could do : 

|link| 

link := MetaLink new. 

link control: #before. 

link arguments: #(#receiver #arguments). 

link metaObject: YourMetaObject. 

link selector: #yourMethodWithArg1:andArg:. 

(C lookupSelector: #mWithArg1:withArg2:withArg3:) ast link: link 

YourMetaObject is here an object which will receive the
yourMethodWithArg1:andArg: with as arguments the receiver of the method
#mWithArg1:withArg2:withArg3: and its arguments as an array. 

It could be a block with 2 arguments, or any other object that you would
use to implement your trace behavior. You have a number of reifications
available that you can pass as arguments from the context, look for
subclasses of RFReification. 

Steven. 

Le 2018-07-27 17:25, Arturo Zambrano a écrit :

> Hi all, 
> I have a piece of undocumented software that I  need  understand ... One 
> thing I would like to do is to have a complete trace of method calls 
> (receivers, parameters)  for certain scenarios. 
> As an "aspects"guy, my first idea was to use Phantom, but it seems not active 
> anymore. 
> 
> Could someone please point me to some tools that I could use for this? (using 
> Pharo 6, 6.1 or  7)  
> 
> Thanks in advance 
> 
> Cheers 
> Arturo

  

Reply via email to