Bug #2760
closedAspectator doesn't process set and get advices for variables
0%
Description
For instance, the given program:
int e11; int e12 (int arg) { e11 = arg; return e11; }
isn't coordinated with the given aspect:
before: set (int e11) { $arg1++; } before: get (int e11) { $arg1--; }
Updated by Evgeny Novikov over 12 years ago
I guess that this was missed while migrating from LLVM based aspectator to the GCC based one. There is a comment in ldv-pointcut-matcher.c:
/* TODO!!! Don't forget to get set/get and arg size/name instrumentation from the function below. */ void ldv_match_expr_2 (tree t); void ldv_match_expr_2 (tree t) { ... }
Updated by Alexey Khoroshilov over 12 years ago
before: set (int e11) { $arg1++; } before: get (int e11) { $arg1--; }
How syntax of set/get variable pointcuts differs from syntax of pointcuts for functions. And what $arg1 does mean?
Updated by Evgeny Novikov over 12 years ago
Alexey Khoroshilov wrote:
[...]
How syntax of set/get variable pointcuts differs from syntax of pointcuts for functions. And what $arg1 does mean?
For set/get variable pointcut syntax is (pseudo grammar):
set|get ( var_decl )
for functions:
call|execution ( func_decl )
$argN - is Nth argument of an auxiliary function to be created on pointcut matching. It isn't obvious in case of variable pointcut but can be used as a temporary solution. May be something like $var or $var_name would be better.
Updated by Evgeny Novikov over 12 years ago
- Status changed from Open to Resolved
Fixed in feature-2958/f3d78a6. Will be tested with other #2958 issues.
Updated by Evgeny Novikov over 12 years ago
- Published in build set to 7775bfe
Merged to the master branch in commit 7775bfe.
Updated by Evgeny Novikov about 12 years ago
- Project changed from Linux Driver Verification to C Instrumentation Framework
- Category deleted (
15)