[aspectc-user] Weaved Join Points not Executing

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Tue Nov 22 09:11:24 CET 2005

Hi Mark,

which functions are transformed properly and which functions are not? 
There are several explanations, but I have not enough information to 
tell which one is right. You can choose from:

* the implementation of the functions is located in different files.
   Not all of the files are transformed by the weaver, because of your
   Makefile/build script/etc. In this case
   the weaver would list all functions, because the declarations in
   the header files are visible. However, the function bodies would
   not be transformed.

* the problem might also related to templates. For example, ac++ does
   not transform function templates. However, in this case the functions
   should not be listed as execution join points.

* there are also problems/restrictions if types instanciated from
   templates are used in the argument list of a function if you don't
   use the --real-instances option (which is experimental).

* macros also cause trouble. AspectC++ does not transform
   macro-generated code. For historical reasons the weaver prints some
   "bad ... MANIPULATOR" message and save the translation unit *without*
   weaving at any join point. If your client code is located in a
   different translation unit, the inline functions (defined in the
   header file) would be transformed while the non-inline functions are
   unmodified.  [the next version (1.0pre2) will handle macros better]

I hope that any of the explanations is the right one.

Best regards,


PS: Note that within("FOO") also matches all call join points within "FOO".

Mark Hennessy wrote:
> I have a simple pointcut defined to trace the execution
> of every method within a class. 
> pointcut method() = within("Actions");
> advice method() : before()
> 	{
> 		printf("%s\n", JoinPoint::signature ());
> 	}
> When I weave the aspect and use the -v9 parameter
> passed to ac++, a list of execution Join Points are printed
> out for example:
> void Actions::function_definition_1(cAsgNode *)
> but when I go to test the weaved system, only a small
> selection of the Join Points actually get executed.
> If I manually insert tracing code within function_definition_1
> method, it is being executed but the weaved code
> wont print out that is has been executed.
> The -v9 option says that all of the methods have been
> woven but the execution only prints out a tiny amount
> of the methods when I know they are being executed
> so what am I doing wrong?
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user

More information about the aspectc-user mailing list