--- layout: fc_discuss_archives title: Message 3 from Frama-C-discuss on December 2014 ---
Hello, thank you for the answer. I couldn't understand much from syntactic_callgraph. But following your last advice: if I find the function by name and then look at its declaration (*fundec) *and finally list of all statements in the function (*sallstmts*), how can I tell which statement is a function call? Best, Ivan On Tue, Dec 2, 2014 at 8:45 AM, Virgile Prevosto <virgile.prevosto at m4x.org> wrote: > Hello, > > 2014-12-01 19:07 GMT+01:00 Ivan Gavran <gavran at mpi-sws.org>: > > Hi, > > > > I'm learning how to develop a plugin for Frama-c and have a question. > > Assume that function f is considered. Is there a way to get a list of > all > > functions that are posted within the function f? > > > > I'm not completely sure of what you mean by "posted", but if you want > to know which functions f might call, you can have a look at the > syntactic_callgraph and semantic_callgraph plugins in Frama-C's src/. > They use dot to generate a callgraph, with semantic_callgraph taking > care of function pointers if any (relying on information computed by > Value Analysis). Basically, you have to retrieve the definition of f > (via e.g. Globals.Functions.find_by_name) and visit each Call > instruction that you find in the body of f. > > Best regards, > -- > E tutto per oggi, a la prossima volta > Virgile > _______________________________________________ > Frama-c-discuss mailing list > Frama-c-discuss at lists.gforge.inria.fr > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/frama-c-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20141202/c3eafdb6/attachment.html>