[vwnc] Can I set a probe for a specific instance?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Can I set a probe for a specific instance?

Thomas Gagné-2
At a point in my program I want to set a breakpoint inside a specific
instance of a MySQLBuffer.  I've tried setting conditionals based on the
values of instance variables but those are problematic.  Since an
instance already has an identity (of sorts) is there a way to work an
instance's identity into a probe?

--
Visit <http://tggagne.blogspot.com/> for more great reading.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Can I set a probe for a specific instance?

Karsten Kusche
Hi Thomas,

can't you set a shared variable to the value of the instance to probe
and then compare the current instance with the shared variable. If
they're equal, just break.

Kind Regards
Karsten



Thomas Gagné wrote:
> At a point in my program I want to set a breakpoint inside a specific
> instance of a MySQLBuffer.  I've tried setting conditionals based on the
> values of instance variables but those are problematic.  Since an
> instance already has an identity (of sorts) is there a way to work an
> instance's identity into a probe?
>
>  

--
Karsten Kusche - Dipl.Inf. - [hidden email]
Georg Heeg eK - Köthen
Handelsregister: Amtsgericht Dortmund A 12812

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Can I set a probe for a specific instance?

Terry Raymond
In reply to this post by Thomas Gagné-2
Thomas

Yes.

You need some place in your code where you can identify
the instance you are interested in.

1. Insert a conditional breakpoint probe where you can
   identify the instance. The conditional expression should
   put the instance into a "global" debug variable and
   then return false(this will prevent the breakpoint from
   triggering).
2. Where you want code to halt, insert another conditional
   breakpoint and make the expression something like
    ^DebugActive and: [BreakInstance == self]

You can find more debugging hints in the PDF documentation.

Terry
 
===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf
> Of Thomas Gagné
> Sent: Friday, April 04, 2008 11:21 AM
> To: vwnc
> Subject: [vwnc] Can I set a probe for a specific instance?
>
> At a point in my program I want to set a breakpoint inside a specific
> instance of a MySQLBuffer.  I've tried setting conditionals based on the
> values of instance variables but those are problematic.  Since an
> instance already has an identity (of sorts) is there a way to work an
> instance's identity into a probe?
>
> --
> Visit <http://tggagne.blogspot.com/> for more great reading.
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Can I set a probe for a specific instance?

Runar Jordahl
I usually compare against the hash value of the object I want to
trigger the breakpoint. This saves me the work of using global
variables.

^DebugActive and: [71 = self hash]

In the example above, the break will happened if self is a Point with
the values 19@11.

Runar Jordahl
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Can I set a probe for a specific instance?

hernanmd
In reply to this post by Thomas Gagné-2
There is a technique called "Lightweight Classes" for setting specific
instance behavior. IIRC when VW 3.0 was released, the available
implementation didn't worked anymore because many classes from VW 2.5
were removed. I searched for an updated implementation but didn't
found it [*].

Well, I was able to resurrect the Lightweight Classes under VW 7.x,
maybe this could be of interest in the VW community. I don't know if
it's legal to publish the package since, as I noted, brings back to
life some removed classes (like CodeStream, and no, I never analyzed
what collateral or side effects this could bring into an image).
Someone in Cincom may wish to give the ok or not here to make it
available.

Hernán

[*] and however, I didn't felt comfortable with the Browser for
Lightweight Classes, so I started to rewrite it as a "Instances
Browser".

Con fecha Viernes, 04 de Abril de 2008, 12:21:26 p.m., escribió:

> At a point in my program I want to set a breakpoint inside a specific
> instance of a MySQLBuffer.  I've tried setting conditionals based on the
> values of instance variables but those are problematic.  Since an
> instance already has an identity (of sorts) is there a way to work an
> instance's identity into a probe?



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc