浏览代码

Do not double-count the first line of function in debugger

hughsando 8 年之前
父节点
当前提交
6eb39cc36e
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/generators/gencpp.ml

+ 1 - 0
src/generators/gencpp.ml

@@ -3260,6 +3260,7 @@ let gen_cpp_ast_expression_tree ctx class_name func_name function_args function_
          List.iter gen_closure closures;
          List.iter gen_closure closures;
          (match injection with Some inject -> inject.inj_prologue gc_stack | _ -> () );
          (match injection with Some inject -> inject.inj_prologue gc_stack | _ -> () );
          let remaining = ref (List.length exprs) in
          let remaining = ref (List.length exprs) in
+         lastLine := Lexer.get_error_line tree.epos;
          List.iter (fun e ->
          List.iter (fun e ->
             output_p e "";
             output_p e "";
             if (!remaining=1) then
             if (!remaining=1) then