cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Searching for global items in the source code
Date: Sat, 2 May 2020 09:43:42 +0200	[thread overview]
Message-ID: <eaae5c04-f177-df67-9131-cdcc920116e6@web.de> (raw)
In-Reply-To: <alpine.DEB.2.21.2005020904160.2538@hadrien>

>>> In this case, the problem entirely on your side.  You should separate the
>>> two top-level declarations into two separate rules, just like any other
>>> two top-level declarations you would like to match.
>>
>> My SmPL script example affects the understanding of the software behaviour
>> also around the following information.
>> https://github.com/coccinelle/coccinelle/blob/a549b9f0a20e14fe9c36f45990b40dc5708ef8f2/docs/manual/cocci_syntax.tex#L1649
>>
>> “…
>> All matching done by a SmPL rule is done intraprocedurally.
>> …”
>>
>>
>> * How are items represented from the global name space?
>>
>> * Would the interpretation of the situation be adjusted if a macro call
>>   and a function implementation would be moved into an other usage context
>>   like a C++ class (or an enclosing function implementation)?
>
> I don't understand any of the above.

I find such feedback also interesting somehow.

1. How will we achieve a better common understanding once more in this area?

2. It seems that you prefer so far to refer to “top-level” items instead of
   thinking with relationships to name spaces.

3. Can you imagine consequences according to nested function implementations?

4. The Coccinelle software contains limitations according to intraprocedural
   data processing.
   Under which circumstances will the application of interprocedural source
   code analysis increase?


>>> You also need a
>>>
>>> declarer name EXPORT_SYMBOL;
>>>
>>> in the rule that you need to create for matching that part of the code.
>>
>> Can it become interesting to match a macro call (or a similar annotation/attribute)
>> also without the declaration of such a metavariable?
>> https://github.com/coccinelle/coccinelle/blob/a549b9f0a20e14fe9c36f45990b40dc5708ef8f2/docs/manual/cocci_syntax.tex#L310
>
> It has nothing to do with EXPORT_SYMBOL being a macro.  The declaration is
> needed to tell Coccinelle to look for the thing at top level.

Will it become helpful to add such an information also to the SmPL manual?
Can the software documentation become clearer another bit
also at this place?


> Otherwise EXPORT_SYMBOL(...); looks like a function call.

Function-like macros are just looking so similar.

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

      reply	other threads:[~2020-05-02  7:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 11:43 [Cocci] Searching for exported Linux functions Markus Elfring
     [not found] ` <alpine.DEB.2.21.2005011348250.2504@hadrien>
2020-05-01 12:36   ` Markus Elfring
2020-05-02  5:56   ` [Cocci] Searching for global items in the source code Markus Elfring
2020-05-02  7:05     ` Julia Lawall
2020-05-02  7:43       ` Markus Elfring [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eaae5c04-f177-df67-9131-cdcc920116e6@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    --cc=julia.lawall@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).