I want to analyze a file from a large project to create a Program Dependence Graph using Frama-C, but keep getting odd errors such as:
/usr/include/bits/fcntl-linux.h:305:[kernel] user error: Length of array is zero. This extension is unsupported
If I try to use the libc implementation provided by frama-c, compilation fails due to missing headers such as sys/file.h.
I am trying to analyze files from the Lynx project, specifically the file in src/WWW/Library/Implementation/HTTP.c, using GCC version 4.8.1
What I really need is to be able to generate a PDG for this source file (which of course has various dependencies) but I think if I could get even a somewhat incomplete graph by skipping over undefined functions, that would be a great first step.
export CPP='gcc -C -E -I/path/to/headers -I.'- Cristiano Sousa-nostdinctells GCC not to use the system's headers at all), but it seems the OP already knows this. It is true that some widely used headers are not provided in Frama-C: the Frama-C provided headers are the bare minimum C-mandated ones (and perhaps some POSIX ones). - Pascal Cuoq