--- layout: fc_discuss_archives title: Message 6 from Frama-C-discuss on June 2011 ---
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Scope plugin from command line



Hello,

Le 05/06/2011 04:24, Vijayaraghavan Murali a ?crit :
> The output from -pdg is almost exactly what I wanted, except since there is no
> line number information printed, there is no way to find out which line the
> [Elem]s correspond to. One can look at the actual code that is printed next to
> [Elem], but the exact same code (syntax-wise) could appear at different places
> in the program.

The PDG output is mainly use for debug purpose and then I am not surprised
that it is difficult to extract information from it...

> Is there a way to print line number information or is there any mapping from the
> [Elem]s to program points? This would solve all my problems.

At the moment, there is no way to do that with the existing options,
but maybe you should consider writing a small plug-in to extract exactly
the information that you need. As Pascal said, the provided information
could then be much richer. For instance, for the "Dependencies -> Show defs"
information, you should have a look at the function [Scope.get_defs]
in [src/kernel/db.mli]. Because it gives you the internal representation
you'll be able to get information such as line number, and so on.

If you chose to do so and need some help, please ask.
Maybe it can be useful to have a little more information about what you
are trying to do in order to give you a more appropriate answer ?

Hope this helps,
-- 
Anne.