From: Johannes Berg <johannes@sipsolutions.net>
To: mosfet <forumer@smartmobili.com>
Cc: linux-sparse@vger.kernel.org
Subject: Re: source code transform
Date: Wed, 07 Jan 2009 20:03:16 +0100 [thread overview]
Message-ID: <1231354996.3545.80.camel@johannes> (raw)
In-Reply-To: <a15fe1ffe7f7a6faf8f79d4ac780b663@mail.smartmobili.com> (sfid-20090107_195448_954457_6DD33448)
[-- Attachment #1: Type: text/plain, Size: 717 bytes --]
On Wed, 2009-01-07 at 19:48 +0100, mosfet wrote:
> I would like to know if sparse would be able to parse GCC source file to
> add a comment in each function it encounters ?
> For instance let's say I want to trace every function in c-parser.c :
>
>
> static struct c_typespec
> c_parser_enum_specifier (c_parser *parser)
> {
> ...
>
> }
>
> in a first step I would like to modify source code like this :
>
> static struct c_typespec
> c_parser_enum_specifier (c_parser *parser)
> {
> fprintf(stderr, "c-parser.c: c_parser_enum_specifier()\n");
> ...
>
> }
>
> is it possible with sparse ?
Not sure, but spatch might be able to:
http://www.emn.fr/x-info/coccinelle/
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2009-01-07 19:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 18:48 source code transform mosfet
2009-01-07 19:03 ` Johannes Berg [this message]
2009-01-08 7:52 ` Nicholas Mc Guire
2009-01-08 23:45 ` Yoann Padioleau
2009-01-09 0:38 ` Harvey Harrison
2009-01-09 17:06 ` Yoann Padioleau
2009-01-31 23:37 ` H. Peter Anvin
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=1231354996.3545.80.camel@johannes \
--to=johannes@sipsolutions.net \
--cc=forumer@smartmobili.com \
--cc=linux-sparse@vger.kernel.org \
/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).