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] patchFile


> My goal is to analyse C code without modifying the original source code.? I
> want to get rid of all the #include <filename.h> directives since Frama-C
> value analysis does not work properly with these files included.

What happens with the #include directives is entirely up to the pre-processor.
You can use whichever pre-processor you want,
or you can use the standard pre-processor
(Frama-C launches "gcc -C -E -I." by default) and make sure that the
include path
contains alternative versions of the files that Frama-C can handle.

> After looking though the Frama-C code I found which tests for a
> patchFile and a comment about the arg --patchFile and code in
> applyPatch.

Frama-C's front-end derives from CIL, which, I think, derives from FrontC.
Anyway, that part of the front-end is not supported in Frama-C. If you want to
apply a transformation to your C files, make a pre-processing command that
does what you want and use it with option -cpp-command.

> I am still using an old version (Boron) version, does the patch code still
> exist in later versions, and is there an easier way of getting rid of the
> #include files?

The patch code was never supported, but the easier way mentioned above
works with all recent versions. You should still upgrade. The list of features
you are missing is at (the latest, you are
missing if you are not a subscriber to "extended level" support ).

The Nitrogen Open Source Frama-C version is packaged in Debian Testing
and numerous other Linux distributions, and a much-awaited Windows binary
is now available.