[aspectc-user] a few problem or bug
sh jalilian
sh.jalilian at yahoo.com
Tue Apr 26 15:18:34 CEST 2011
hi dear
Recently I have reported a problem about args() and I test your solution but yet
there is some problems I want to report here:
------------------ main code -------------------------------
void f1(int i, char *str) {}
void main()
{
f1(1, "test");
}
------------------ aspect code -------------------------------
aspect A1{
advice call("% f%(...)") : after() {
cout << "int value= " << *(int *)tjp->arg(0) << "char * string= " << (char
*)tjp->arg(1) << endl;
}
};
problem 1) -----------------
arg(0) output is OK for int type but arg(1) does not work for "char *" and
-------------------------------------------------------------------
problem 2) ----------------------------------------------
function args() can return arguments (you should specify all arguments in args()
) but args() has problem when you want to use by "within" statement:
aspect A2{
pointcut PC1 = call("% f%(int i, char *s)") && !within("A2") && args(i, s);
advice PC1(i, s) : after(int i, char *s) {
cout << "func call" << endl;
f1(5, "test2");
}
}
----------------------------------------------------------------------------
problem 3) a general bug in Aspectc is that it is not capture joinpoints such as
"unsigned char" objects.
best regards
Sh.Jalilian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20110426/c08e193c/attachment.html>
More information about the aspectc-user
mailing list