File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1024,7 +1024,16 @@ void Debugger::handleSnapshotPolicy(Module *m) {
10241024 this ->channel ->write (" \n " );
10251025 } else if (snapshotPolicy == SnapshotPolicy::checkpointing) {
10261026 if (instructions_executed >= checkpointInterval || fidx_called) {
1027- checkpoint (m);
1027+ if (min_return_values == 0 ) {
1028+ checkpoint (m);
1029+ } else {
1030+ if (fidx_called) {
1031+ const Type* type = m->functions [*fidx_called].type ;
1032+ if (type->result_count >= min_return_values) {
1033+ checkpoint (m);
1034+ }
1035+ }
1036+ }
10281037 }
10291038 instructions_executed++;
10301039
@@ -1046,19 +1055,6 @@ void Debugger::checkpoint(Module *m, const bool force) {
10461055 return ;
10471056 }
10481057
1049- if (min_return_values != 0 ) {
1050- if (!fidx_called) {
1051- // Tracing mode is on, but no primitive was called.
1052- return ;
1053- }
1054-
1055- const Type *type = m->functions [*fidx_called].type ;
1056- if (type->result_count < min_return_values) {
1057- // Primitive was called but did not have the required return values.
1058- return ;
1059- }
1060- }
1061-
10621058 this ->channel ->write (R"( CHECKPOINT {"instructions_executed": %d, )" ,
10631059 instructions_executed);
10641060 if (fidx_called) {
You can’t perform that action at this time.
0 commit comments