|
|
|
@ -83,11 +83,30 @@ let print_results tenv actual_pre results =
|
|
|
|
|
L.d_strln "***** END RESULTS FUNCTION CALL *******"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let log_call_trace caller_name callee_name ?reason loc res =
|
|
|
|
|
let log_call_trace ~caller_name ~callee_name ?callee_attributes ?reason loc res =
|
|
|
|
|
let get_valid_source_file loc =
|
|
|
|
|
let file = loc.Location.file in
|
|
|
|
|
if SourceFile.is_invalid file then None else Some file
|
|
|
|
|
in
|
|
|
|
|
let callee_clang_method_kind, callee_source_file =
|
|
|
|
|
match callee_attributes with
|
|
|
|
|
| Some attributes when Language.curr_language_is Language.Clang ->
|
|
|
|
|
let callee_clang_method_kind =
|
|
|
|
|
ProcAttributes.string_of_clang_method_kind attributes.ProcAttributes.clang_method_kind
|
|
|
|
|
in
|
|
|
|
|
let callee_source_file = get_valid_source_file attributes.ProcAttributes.loc in
|
|
|
|
|
(Some callee_clang_method_kind, callee_source_file)
|
|
|
|
|
| Some attributes ->
|
|
|
|
|
(None, get_valid_source_file attributes.ProcAttributes.loc)
|
|
|
|
|
| None ->
|
|
|
|
|
(None, None)
|
|
|
|
|
in
|
|
|
|
|
let call_trace =
|
|
|
|
|
EventLogger.CallTrace
|
|
|
|
|
{ call_location= loc
|
|
|
|
|
; call_result= string_of_call_result res
|
|
|
|
|
; callee_clang_method_kind
|
|
|
|
|
; callee_source_file
|
|
|
|
|
; callee_name= Typ.Procname.to_string callee_name
|
|
|
|
|
; caller_name= Typ.Procname.to_string caller_name
|
|
|
|
|
; lang= Typ.Procname.get_language caller_name |> Language.to_explicit_string
|
|
|
|
@ -1428,9 +1447,9 @@ let exe_call_postprocess tenv ret_id trace_call callee_pname callee_attrs loc re
|
|
|
|
|
(** Execute the function call and return the list of results with return value *)
|
|
|
|
|
let exe_function_call exe_env callee_summary tenv ret_id caller_pdesc callee_pname loc
|
|
|
|
|
actual_params prop path =
|
|
|
|
|
let callee_attrs = Summary.get_attributes callee_summary in
|
|
|
|
|
let caller_pname = Procdesc.get_proc_name caller_pdesc in
|
|
|
|
|
let trace_call = log_call_trace caller_pname callee_pname loc in
|
|
|
|
|
let callee_attributes = Summary.get_attributes callee_summary in
|
|
|
|
|
let caller_name = Procdesc.get_proc_name caller_pdesc in
|
|
|
|
|
let trace_call = log_call_trace ~caller_name ~callee_name:callee_pname ~callee_attributes loc in
|
|
|
|
|
let spec_list, formal_params = spec_find_rename trace_call callee_summary in
|
|
|
|
|
let nspecs = List.length spec_list in
|
|
|
|
|
L.d_strln
|
|
|
|
@ -1444,4 +1463,4 @@ let exe_function_call exe_env callee_summary tenv ret_id caller_pdesc callee_pna
|
|
|
|
|
actual_params formal_params
|
|
|
|
|
in
|
|
|
|
|
let results = List.map ~f:exe_one_spec spec_list in
|
|
|
|
|
exe_call_postprocess tenv ret_id trace_call callee_pname callee_attrs loc results
|
|
|
|
|
exe_call_postprocess tenv ret_id trace_call callee_pname callee_attributes loc results
|
|
|
|
|