Bug #2760
closed
Aspectator doesn't process set and get advices for variables
Added by Evgeny Novikov over 12 years ago.
Updated about 12 years ago.
Published in build:
7775bfe
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--;
}
Related issues
1 (1 open — 0 closed)
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)
{
...
}
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?
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.
- Status changed from Open to Resolved
Fixed in feature-2958/f3d78a6. Will be tested with other #2958 issues.
- Published in build set to 7775bfe
Merged to the master branch in commit 7775bfe.
- Status changed from Resolved to Closed
- Project changed from Linux Driver Verification to C Instrumentation Framework
- Category deleted (
15)
Also available in: Atom
PDF