Project

General

Profile

Actions

Bug #11295

open

$argi does not work for source code queries

Added by Evgeny Novikov over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
High
Assignee:
-
Category:
Code querying
Start date:
01/17/2022
Due date:
% Done:

0%

Estimated time:
Detected in build:
git
Platform:
Published in build:

Description

For instance, for the following aspect:

query: call(int get_property(const char *)) 
{
  $fprintf<"work/info.txt", "%s %s\n", "get", $arg1>;
}

and the following C source file:

int get_property(const char *);

void func(void)
{
    int prop1_val;

    prop1_val = get_property("prop1");
}

there is such the failure:

internal compiler error: required parameter has number "1" that exceeds the maximum one "0" 

Related issues 2 (1 open1 closed)

Related to C Instrumentation Framework - Bug #11370: Refactor advice body patterns (special directives)Rejected01/27/2022

Actions
Related to C Instrumentation Framework - Feature #6826: Make refactoring of advice body patternsNewEvgeny Novikov02/09/2016

Actions
Actions #1

Updated by Evgeny Novikov over 2 years ago

I thought about this. It seems that it should not work by design since it may be too hard for CIF to compute printable values for "$argi", though it may be easy in some cases, say, when passing strings or integers. Anyway, at the moment I just suggest to fix up appropriate confusing error messages.

BTW, some other special directives may not work for source code queries as well. It has sense to fix error messages for them as well.

Actions #2

Updated by Evgeny Novikov over 2 years ago

  • Related to Bug #11370: Refactor advice body patterns (special directives) added
Actions #3

Updated by Evgeny Novikov over 2 years ago

  • Related to Feature #6826: Make refactoring of advice body patterns added
Actions

Also available in: Atom PDF