Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.

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

[Frama-c-discuss] List of function calls within a function


2014-12-01 19:07 GMT+01:00 Ivan Gavran <gavran at>:
> 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