没有从命令行直接解决。但是,可以使用简单的脚本(例如(未经测试)
)轻松完成此操作let print_type () =
Ast.compute();
Globals.Vars.iter
(fun v _ ->
Format.printf "Variable %a: %a@."
Cil_datatype.Varinfo.pretty v
Cil_datatype.Typ.pretty v.vtype)
let () = Db.Main.extend print_type
可以用frama-c -load-script <my_script.ml> <other args including source files>
启动
developer manual中提供了有关脚本Frama-C的更多信息(包括广泛的教程)。>