I think what you want is the iteration facility? Look at demos/iteration.cocci. This is currently only supported via ocaml.
You may also find these slides useful: http://coccinelle.lip6.fr/papers/cocciwk4_talk2.pdf Starting from slide 14. julia On Tue, 22 Mar 2011, Enayat Shirazi wrote: > > Hi, > > Is there any way with Coccinelle to abstract away intermittent functions > calls > to find all functions with a specific code pattern which directly or > indirectly > are called from a specific function? In example following find all functions > like fun_n which are calling a specific function foo and directly or > indirectly > can be invoked from fun_1: > > X fun_1(...){ > ÿÿ > fun_2(); > ... > } > > Y fun_2(...){ > ÿÿ > fun_3(); > ... > } > > ÿÿ > > M fun_m(...) > { > ... > fun_n(...); > ... > } > > N fun_n(...){ > ÿÿ > foo(); > ... > } > > > Regards > Enayat > > > > _______________________________________________ > Cocci mailing list > [email protected] > http://lists.diku.dk/mailman/listinfo/cocci > (Web access from inside DIKUs LAN only) >
_______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
