Project

General

Profile

Actions

Bug #2760

closed

Aspectator doesn't process set and get advices for variables

Added by Evgeny Novikov about 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
High
Category:
-
Start date:
04/16/2012
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
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 open0 closed)

Related to C Instrumentation Framework - Feature #2960: Aspectator should support get pointcut in the more full wayOpenEvgeny Novikov06/06/2012

Actions
Actions #1

Updated by Evgeny Novikov about 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)
{
...
}

Actions #2

Updated by Alexey Khoroshilov about 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?

Actions #3

Updated by Evgeny Novikov about 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.

Actions #4

Updated by Evgeny Novikov almost 12 years ago

  • Status changed from Open to Resolved

Fixed in feature-2958/f3d78a6. Will be tested with other #2958 issues.

Actions #5

Updated by Evgeny Novikov almost 12 years ago

  • Published in build set to 7775bfe

Merged to the master branch in commit 7775bfe.

Actions #6

Updated by Evgeny Novikov almost 12 years ago

  • Status changed from Resolved to Closed

Works fine.

Actions #7

Updated by Evgeny Novikov over 11 years ago

  • Project changed from Linux Driver Verification to C Instrumentation Framework
  • Category deleted (15)
Actions

Also available in: Atom PDF