File tree 2 files changed +23
-4
lines changed
regression/cbmc/trace_show_function_calls
2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 3
3
--trace --trace-show-function-calls
4
4
^EXIT=10$
5
5
^SIGNAL=0$
6
- Function call: function_to_call \(depth 2\)
6
+ Function call: function_to_call\(-2147483647\) \(depth 2\)
7
7
Function return: function_to_call \(depth 1\)
8
- Function call: function_to_call \(depth 2\)
8
+ Function call: function_to_call\(-2\) \(depth 2\)
9
9
^VERIFICATION FAILED$
10
10
--
11
11
^warning: ignoring
Original file line number Diff line number Diff line change @@ -444,15 +444,34 @@ void show_goto_trace(
444
444
case goto_trace_stept::typet::FUNCTION_CALL:
445
445
function_depth++;
446
446
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
+ }
449
464
break ;
465
+
450
466
case goto_trace_stept::typet::FUNCTION_RETURN:
451
467
function_depth--;
452
468
if (options.show_function_calls )
469
+ {
453
470
out << " \n #### Function return: " << step.function_identifier
454
471
<< " (depth " << function_depth << " ) ####\n " ;
472
+ }
455
473
break ;
474
+
456
475
case goto_trace_stept::typet::SPAWN:
457
476
case goto_trace_stept::typet::MEMORY_BARRIER:
458
477
case goto_trace_stept::typet::ATOMIC_BEGIN:
You can’t perform that action at this time.
0 commit comments