Luiz-Monad / aspectc

Automatically exported from code.google.com/p/aspectc
0 stars 0 forks source link

SET/GET pointcut doesn't support local variables #13

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In .acc file, write lines like "Before: set(int a){ 
printf("print");}"
2. In .mc file, try to access the locally defined int a.
3. Compile the code with gcc and acc

What is the expected output? What do you see instead?
The expect output for this should work the same way as global defined
variables. However, the ACC compile doesn't generate pointcuts for local
variables.

Reported by Ke Deng.

Original issue reported on code.google.com by kedeng1...@gmail.com on 14 May 2010 at 3:49

GoogleCodeExporter commented 8 years ago
Test Case:
To trigger this, we will download the attached files main.c and acc-code.acc.

type the following command lines:
>acc main.mc acc-code.acc
>gcc main.c acc-code.c -L/home/xxx/usr/lib -lacc -o f
>./f

Expected Output:
in main.
this is a point-cut for set.
this is a point-cut for get.
a is '1'.

Actual Output:
in main.
a is '1'.

Original comment by kedeng1...@gmail.com on 14 May 2010 at 3:56

Attachments: