All of lore.kernel.org
 help / color / mirror / Atom feed
From: Strace Labs <stracelabs@gmail.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] Replacing printf() parameters according to used data types
Date: Fri, 29 Nov 2019 15:19:20 -0200	[thread overview]
Message-ID: <CABvP5W1HPdE8=h2LGDo4etG2oWzi7DnycJczu=zVr+AKOamVdA@mail.gmail.com> (raw)
In-Reply-To: <9e9f6596-1b8d-dc4f-86cf-21094200809d@web.de>


[-- Attachment #1.1: Type: text/plain, Size: 2022 bytes --]

On Fri, Nov 29, 2019 at 2:09 PM Markus Elfring <Markus.Elfring@web.de>
wrote:

> > so, that suggestion works the same as my previous shared statement.
>
> I suggest to take another look at presented implementation details.
>
>
I did it, even digging the grammar and ALL samples and didn't find anything
similar to handle format strings with multiple parameters as mentioned.


>
> > but, only for calls like: *my_printf("%s", h1.name);*,
>
> I limited my suggestion intentionally.
>
>
> > not for *my_printf("%d here also, tt=%s | %s and %m\n", id, h2->name,
> h2->name, s2);*
>
> Such a function call is using more parameters. Would you get into
> the mood then to specify additional metavariables in SmPL script variants?
>
>

I can't because the calls around the code have different uses with
different variants.



> > so, I am not sure if Coccinelle is able to do that.
>
> I hope that more useful data processing for format strings will become
> supported by the semantic patch language.
> Yesterday an information was given that another functionality is also
> work in progress.
>



Interesting.



>
> > I've read all samples available in the Kernel and Coccinelle repo's
>
> I find such information interesting and promising.
>
>
> > and I didn't see any similar case.
>
> This observation can be fine.
> How often do you fiddle with source code transformations around
> format strings?
>
>


Well, I've used it before but for me, it is the first "complex" case that I
am working on. even I still digging trying to figure out how to do that but
I still not sure if the Coccelinne is capable to do that yes or no.




>
> > I think that if Julia Lawall don't know, No one in the world knows.
>
> Such an impression can occur. - But I would like to point further
> possibilities out for desired knowledge distribution.
>
> * Would you like to contact any more related developers?

* How do you think about to improve your own expertise
>   (around the discussed free software) in any ways?
>
> Regards,
> Markus
>

[-- Attachment #1.2: Type: text/html, Size: 3526 bytes --]

[-- Attachment #2: Type: text/plain, Size: 136 bytes --]

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

  reply	other threads:[~2019-11-29 17:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28  2:11 [Cocci] Replacing printf/format calls based on the data-type Strace Labs
2019-11-28  7:07 ` Julia Lawall
2019-11-28 17:45   ` Strace Labs
2019-11-29 14:48   ` [Cocci] Replacing printf() parameters according to used data types Markus Elfring
2019-11-28  7:50 ` Markus Elfring
2019-11-29  0:35   ` Jorge Pereira
2019-11-29  8:29     ` Markus Elfring
2019-11-29 10:57       ` Strace Labs
2019-11-29 12:33         ` Markus Elfring
2019-11-29 14:47           ` Strace Labs
2019-11-29 16:08             ` Markus Elfring
2019-11-29 17:19               ` Strace Labs [this message]
2019-11-29 17:45                 ` Markus Elfring
2019-11-29 20:55             ` Julia Lawall
2019-11-30  2:25               ` Strace Labs
2019-11-30  6:35                 ` Julia Lawall
2019-11-30  8:46                 ` Markus Elfring
2019-12-01  8:00                 ` [Cocci] Changing format string usage with SmPL? Markus Elfring
2019-12-03  3:30                   ` Strace Labs
2019-12-03  5:18                     ` Julia Lawall
2019-12-03 13:28                       ` Markus Elfring
2019-12-03 15:43                       ` [Cocci] Generation of expression lists by SmPL script rules? Markus Elfring
2019-12-03 17:28                       ` [Cocci] Changing format string usage with SmPL? Strace Labs
2019-12-04  0:21                         ` Strace Labs
2019-12-06 19:36                           ` Markus Elfring
2019-12-07  7:49                           ` Markus Elfring
2019-12-04  6:47                         ` Julia Lawall
2019-12-06 19:44                           ` Markus Elfring
2019-12-06 19:20                         ` Markus Elfring
2019-12-03 10:01                     ` Markus Elfring
2019-11-30 15:11               ` [Cocci] Replacing printf() parameters according to used data types Markus Elfring

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='CABvP5W1HPdE8=h2LGDo4etG2oWzi7DnycJczu=zVr+AKOamVdA@mail.gmail.com' \
    --to=stracelabs@gmail.com \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@systeme.lip6.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.