Przeglądaj źródła

fixed debug position of loops jump back (close https://github.com/vshaxe/hashlink-debugger/issues/14)

Nicolas Cannasse 7 lat temu
rodzic
commit
67e4416252
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      src/generators/genhl.ml

+ 2 - 0
src/generators/genhl.ml

@@ -2521,6 +2521,7 @@ and eval_expr ctx e =
 		let ret = jump_back ctx in
 		let j = jump_expr ctx cond false in
 		ignore(eval_expr ctx eloop);
+		set_curpos ctx { e.epos with pmin = e.epos.pmax };
 		ret();
 		j();
 		List.iter (fun f -> f (current_pos ctx)) ctx.m.mbreaks;
@@ -2540,6 +2541,7 @@ and eval_expr ctx e =
 		let j = jump_expr ctx cond false in
 		start();
 		ignore(eval_expr ctx eloop);
+		set_curpos ctx { e.epos with pmin = e.epos.pmax };
 		ret();
 		j();
 		List.iter (fun f -> f (current_pos ctx)) ctx.m.mbreaks;