Hello all,
I am completely new to Cil and as a first step I was trying to add a simple
module as a feature to cil.
I did the following:
My module is
simpletest.ml
open Pretty
open Cil
let rec fact n = if n < 2 then 1 else n * fact(n-1)
let doIt n = fact n
let feature : featureDescr =
{ fd_name = "Simpletest";
fd_enabled = ref false;
fd_description = "generation of code to log memory writes";
fd_extraopt = [];
fd_doit = doIt 8;
fd_post_check = true;
}
This is simple module that finds the factorial
I then added this to the src.ext directory I then Modify the Makefile.in and
add module to the CILLY_MODULES or CILLY_LIBRARY_MODULES variables. The
order of the modules matters so I add the modules somewhere after cil and
before main. I also modify main.ml so that the new feature descriptor
appears in the global list of CIL features. Finally I configure and invoke
cilly using --dosimpletest.
But it is not adding this feature and gives following output
gcc -D_GNUCC -E -DCIL=1 hello.c -o /tmp/cil-CYRl1Qq2.i
unknown option `--dosimpletest'.
Usage: cilly [options] source-files
Please help
-Divya
------------------------------------------------------------------------------
_______________________________________________
CIL-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cil-users