Re: [abc-users] Determine a basic block

From: Thomas Pawlitzki <mailinglist_at_pawlitzki.name>
Date: Wed, 16 Apr 2008 08:48:40 +0200

Hello Amjad,

I am planning to do something similar. A block which can be matched by
a pointcut expression but can also expose arguments into the advice.

I imagine something like:

public void foo() {
    ...
    block(a, "hallo", b) {
        // Block statments
    }
    ...
}

Because I only worked with the frontend's of abc I have some
difficulties to start with the block-pointcut. Perhaps you can
describe your proceeding to give me some help

Thank you in advance.

Greetings,
Thomas

2008/4/10, Amjad Nusayr <anusayr_at_cs.nmsu.edu>:
> Hi
> I have created an extension that allows basic blocks to be shadowed, the
> extension works fine, as Eric said, I created a BlockShadowMatch to do the
> work. but it seems that I cant get any reflective information working. I
> have created - in my runtime source - a basic block factory class. and in my
> BlockShadowMatch.makeSJPInfo, I refer to my BlockSignatureImpl.
>
> When I try to access information of the new block joinpoint using
> thisJoinPoint, abc weaves without any problems, but when I try to run my
> program, I get the following error.
>
> --------------------------------
> Exception in thread "main" java.lang.VerifyError: (class: Hello, method:
> <init>
> signature: ()V) Expecting to find unitialized object on stack
> ------------------------------------
>
> Does anyone know what Im doing wrong?? the new joinpoint works fine
> elsewise!!
>
> Regards
> Amjad
>
>
>
>
> Eric Bodden wrote:
>
> > Hi.
> >
> > Right now, abc supports has two types for ShadowMatch: StmtShadowMatch
> > and BodyShadowMatch. You probably want to extend this to also provide
> > a BlockShadowMatch. Also, you have to create a new subclass of
> > ShadowType, e.g. BlockShadowType, and register it in:
> > AbcExtension.listShadowTypes().
> >
> > Basic blocks are easy to figure out from Jimple: Just create a new
> > soot.toolkits.graph.BlockGraph.
> >
> > Eric
> >
> > On 05/03/2008, Amjad Nusayr <anusayr_at_cs.nmsu.edu> wrote:
> >
> >
> > > Hi
> > > Im trying to write an extension where I want to shadow a basic block of
> > > code, jimple does not have any direct way of doing this, does any body
> > > have any idea how to achieve this?
> > >
> > >
> > >
> > > Amjad Nusayr
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
Received on Wed Apr 16 2008 - 07:48:42 BST

This archive was generated by hypermail 2.2.0 : Wed Apr 16 2008 - 15:20:12 BST