Skip to content
Snippets Groups Projects
Commit 65e801a6 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

Merge branch 'feature/ivette/print-ast-libc' into 'master'

[driver] enable libc printing

Closes #831

See merge request frama-c/frama-c!2769
parents 5098e24a d1bd0f72
No related branches found
No related tags found
No related merge requests found
......@@ -258,7 +258,14 @@ let () = Request.register ~package
~kind:`GET ~name:"printFunction"
~descr:(Md.plain "Print the AST of a function")
~input:(module Kf) ~output:(module Jtext)
(fun kf -> Jbuffer.to_json Printer.pp_global (Kernel_function.get_global kf))
begin fun kf ->
let libc = Kernel.PrintLibc.get () in
if not libc then Kernel.PrintLibc.set true ;
let global = Kernel_function.get_global kf in
let ast = Jbuffer.to_json Printer.pp_global global in
if not libc then Kernel.PrintLibc.set false ;
ast
end
module Functions =
struct
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment