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] GUI - Opening a file (Windows XP)



Hello,

> I opened the GUI using the normal command frama-c-gui from Cygwin.
> When I try to open a C file (the beginner example file on the website,
> first.c), it says that there was an
> error and I have to see the console.
> The error being displayed on the console is that "Access is denied".
>
> Even when running the tool from the command line, it throws an error while
> running gcc.

Trying to use gcc yourself to pre-process the file.  The command would
be "gcc -C -E -I. -o first.i?first.c".

If it works, you can now use first.i as an argument to frama-c instead
of first.c. That will let you circumvent the problem.

If it doesn't work, you are left with the problem of pre-processing
the file one way or the other, ideally with the same pre-processor
that will be used in the actual compilation. Frama-C has nothing to do
with the problem (yet).

> Secondly, it suggests using the -cpp-command option, which does not produce
> any output if I input
>
> $frama-c -cpp-command first.c

The -cpp-command expects a string. Note that there is a known bug in
the -cpp-command option in Boron.
To quote from a previous message in the mailing list:
________________

You may find that the option -cpp-command does not
handle the tokens %1 and %2 as documented.
That's an unfortunate bug. But since you are already setting
yourself up for compiling Frama-C from sources with
your exotic target architecture, it won't be too much additional
trouble to apply the following patch :

--- src/kernel/file.ml  (revision 8516)
+++ src/kernel/file.ml  (working copy)
@@ -498,7 +498,7 @@
         in
         (* Format.eprintf "-cpp-command cmd2=|%s|@\n" cmd2; *)
          let cmd3 =
-           String.sub cmdl (percent2 + 2) (String.length cmdl - percent2 + 2)
+           String.sub cmdl (percent2 + 2) (String.length cmdl - (percent2 + 2))
          in
         (* Format.eprintf "-cpp-command cmd3=|%s|@\n" cmd3; *)
          Format.sprintf "%s%s %s %s%s%s" cmd1
_________________

If you do not wish to recompile Frama-C, use the workaround of
pre-processing each file yourself using the .i extension for the
result. In the case of the mini-tutorial first.c, no pre-processing is
needing so you can simply rename it first.i.

You can also read the threads initiated by Patrick Nylund in the May
archives of this mailing list for more information:

http://lists.gforge.inria.fr/pipermail/frama-c-discuss/2010-May/thread.html

Pascal