[aspectc-user] Re: question about aspecting library functions

Danilo Beuche danilo.beuche at pure-systems.com
Tue Jun 24 20:30:01 CEST 2003


the answer comes in three pieces:

1) one cannot use an "execution()" on library functions because it 
requires access to the library source to weave the aspect. This is not 
what you intended. You should use "call()" instead.

2) However in 0.7pre3 even "call()" does not work, because of a small
  bug in the join point calculation (the bug will be filed in the 
bugzilla soon). The bug prevents call join points for functions with a 
prototype defined in an project external header file (e.g. 
/usr/include/stdio.h). This bug will be fixed soon (i.e. 0.7). This will 
allow you to attach call advices to any library function in principle.

3) There is another more problematic thing especially related to printf 
and any other function with varargs (these three dots ...). The code 
generated by ac++ when such a function is target of an advice, is wrong 
and will not compile. This will be filed as a bug too in bugzilla and 
probably take a little bit longer to fix.

Thats no all good news, but we'll have to leave something for 0.8, 
haven't we?

Danilo Beuche                           Phone: +49-391-54456910
pure-systems GmbH                       Fax:   +49-391-54456990

More information about the aspectc-user mailing list