From c258e988fe208f7b3b28a10a1140a20e5b0e55a6 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Tue, 10 Apr 2018 07:11:14 -0700 Subject: [PATCH] [inferbo/cost] Print alias in debug output Reviewed By: ezgicicek Differential Revision: D7557081 fbshipit-source-id: fba1158 --- infer/src/bufferoverrun/bufferOverrunDomain.ml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/infer/src/bufferoverrun/bufferOverrunDomain.ml b/infer/src/bufferoverrun/bufferOverrunDomain.ml index f3235a5ed..329f58eb7 100644 --- a/infer/src/bufferoverrun/bufferOverrunDomain.ml +++ b/infer/src/bufferoverrun/bufferOverrunDomain.ml @@ -497,6 +497,11 @@ module Alias = struct let remove_temps : Ident.t list -> astate -> astate = fun temps a -> (AliasMap.remove_temps temps (fst a), snd a) + + + let pp : F.formatter -> astate -> unit = + fun fmt (aliasmap, aliasret) -> + F.fprintf fmt "AliasMap:@;%a@;AliasRet:@;%a@;" AliasMap.pp aliasmap AliasRet.pp aliasret end module PrunePairs = struct @@ -617,10 +622,7 @@ module MemReach = struct let pp : F.formatter -> t -> unit = fun fmt x -> - F.fprintf fmt "Stack:@;" ; - F.fprintf fmt "%a@;" Stack.pp x.stack ; - F.fprintf fmt "Heap:@;" ; - F.fprintf fmt "%a" Heap.pp x.heap + F.fprintf fmt "Stack:@;%a@;Heap:@;%a@;%a" Stack.pp x.stack Heap.pp x.heap Alias.pp x.alias let pp_summary : F.formatter -> t -> unit =