[aspectc-user] weaving twice
Olaf Spinczyk
os at aspectc.org
Wed Jan 30 09:55:35 CET 2008
Hi Francisco,
please try it with the latest version from our svn repository. It looks
as if we meanwhile fixed this problem.
Best regards,
Olaf
Olaf Spinczyk wrote:
> Hi Francisco,
>
> I think this problem is related to bug #349 (member function called
> "aspectof" in normal class causes parser crash). The problem is that
> after the first weaving the aspect is transformed into a class that
> contains a member function called aspectof. I will look into it.
>
> Best regards,
>
> Olaf
>
>
> Francisco Afonso schrieb:
>
>> Hi.
>>
>> This message follows an October/2007 thread:
>>
>> http://p15111082.pureserver.info/pipermail/aspectc-user/2007-October/001175.html
>>
>> I am still receiving a "segmentation fault" from ac++ when weaving for
>> the second time.
>>
>> To check if the problem belongs to my code, I wrote a very simple example.
>> The first weaving is supposed to affect the following files:
>>
>> //---------------classA.h-----------
>> #ifndef __classA_h_
>> #define __classA_h_
>>
>> class A {
>> public:
>> void doSomething1();
>> void doSomething2();
>> };
>> #endif
>>
>> //---------------classA.cc-----------
>> #include <stdio.h>
>> #include "classA.h"
>>
>> void A::doSomething1() {
>> printf("in myClass1::doSomething1\n");
>> }
>>
>> void A::doSomething2() {
>> printf("in myClass1::doSomething2\n");
>> }
>>
>> //---------------exec.ah-----------
>> #ifndef __exec_ah__
>> #define __exec_ah__
>> #include <stdio.h>
>>
>> aspect myAspect {
>> advice execution("% A::doSomething%(...)") : before() {
>> printf("advice before(exec) %s\n", JoinPoint::signature());
>>
>> }
>> };
>> #endif
>> //-----------------------------------
>>
>> This code is in folder named "lib". The woven include files are
>> generated by the following command line executed in the parent directory:
>>
>> ac++ -v1 --config puma.config -I lib -p lib -d lib-inc -i
>>
>> So, the folder lib-inc is created by ac++ with the woven files
>> classA.h and exec.ah.
>>
>> For the application, I have the following main.cc file in the "app"
>> folder.
>>
>> //------------- main.cc --------------
>> #include <stdio.h>
>> #include "classA.h"
>>
>> int main() {
>> A a1;
>> a1.doSomething1();
>> a1.doSomething2();
>> }
>> //-------------------------------------
>>
>> The folder structrure is now:
>> - test (where ac++ is always called)
>> ---- lib
>> ---- lib-inc
>> ---- app
>>
>> In the app I have no aspects yet. Sill I try to use ac++ with the
>> following command line from the "test" folder.
>>
>> ac++ -v9 --config puma.config -I lib-inc -p app -d app-out
>>
>> The result is:
>>
>> [fafonso at pc-fca-at-g weavetwice]$ ./weave2b
>> * Running ac++ 1.0pre3
>> * Simple Dependency Check
>> * Handling Translation Unit `main.cc'.
>> - Path "app/main.cc"
>> - Inserting namespace AC
>> - Parsing ...
>> ./weave2b: line 1: 4364 Segmentation fault
>>
>> Considering that is possible to weave more than one time in AspectC++.
>> I suppose that either there is a bug or I am doing something wrong.
>>
>> Any help?
>>
>> Francisco Afonso
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>> Climb to the top of the charts! Play the word scramble challenge with
>> star power. Play now!
>> <http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> aspectc-user mailing list
>> aspectc-user at aspectc.org
>> http://www.aspectc.org/mailman/listinfo/aspectc-user
>>
>>
>
> _______________________________________________
> 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