File tree Expand file tree Collapse file tree 2 files changed +23
-4
lines changed
regression/cbmc/trace_show_function_calls Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 33--trace --trace-show-function-calls
44^EXIT=10$
55^SIGNAL=0$
6- Function call: function_to_call \(depth 2\)
6+ Function call: function_to_call\(-2147483647\) \(depth 2\)
77Function return: function_to_call \(depth 1\)
8- Function call: function_to_call \(depth 2\)
8+ Function call: function_to_call\(-2\) \(depth 2\)
99^VERIFICATION FAILED$
1010--
1111^warning: ignoring
Original file line number Diff line number Diff line change @@ -444,15 +444,34 @@ void show_goto_trace(
444444 case goto_trace_stept::typet::FUNCTION_CALL:
445445 function_depth++;
446446 if (options.show_function_calls )
447- out << " \n #### Function call: " << step.function_identifier
448- << " (depth " << function_depth << " ) ####\n " ;
447+ {
448+ out << " \n #### Function call: " << step.function_identifier ;
449+ out << ' (' ;
450+
451+ bool first = true ;
452+ for (auto &arg : step.function_arguments )
453+ {
454+ if (first)
455+ first = false ;
456+ else
457+ out << " , " ;
458+
459+ out << from_expr (ns, step.function_identifier , arg);
460+ }
461+
462+ out << " ) (depth " << function_depth << " ) ####\n " ;
463+ }
449464 break ;
465+
450466 case goto_trace_stept::typet::FUNCTION_RETURN:
451467 function_depth--;
452468 if (options.show_function_calls )
469+ {
453470 out << " \n #### Function return: " << step.function_identifier
454471 << " (depth " << function_depth << " ) ####\n " ;
472+ }
455473 break ;
474+
456475 case goto_trace_stept::typet::SPAWN:
457476 case goto_trace_stept::typet::MEMORY_BARRIER:
458477 case goto_trace_stept::typet::ATOMIC_BEGIN:
You can’t perform that action at this time.
0 commit comments