Re: source code transform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux