diff src/vim.h @ 24895:e61a2085c89b v8.2.2985

patch 8.2.2985: Vim9: a compiled function cannot be debugged Commit: https://github.com/vim/vim/commit/e99d422bbd3e47620915bf89671673f0711671b4 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 13 14:01:26 2021 +0200 patch 8.2.2985: Vim9: a compiled function cannot be debugged Problem: Vim9: a compiled function cannot be debugged. Solution: Add initial debugging support.
author Bram Moolenaar <Bram@vim.org>
date Sun, 13 Jun 2021 14:15:04 +0200
parents e8451dc0d643
children fd6e5c816654
line wrap: on
line diff
--- a/src/vim.h
+++ b/src/vim.h
@@ -1794,10 +1794,17 @@ typedef struct timeval proftime_T;
 typedef int proftime_T;	    // dummy for function prototypes
 #endif
 
+// Type of compilation passed to compile_def_function()
+typedef enum {
+    CT_NONE,	    // use df_instr
+    CT_PROFILE,	    // use df_instr_prof
+    CT_DEBUG	    // use df_instr_debug, overrules CT_PROFILE
+} compiletype_T;
+
 #ifdef FEAT_PROFILE
-# define PROFILING(ufunc) (do_profiling == PROF_YES && (ufunc)->uf_profiling)
+# define COMPILE_TYPE(ufunc) (debug_break_level > 0 ? CT_DEBUG : do_profiling == PROF_YES && (ufunc)->uf_profiling ? CT_PROFILE : CT_NONE)
 #else
-# define PROFILING(ufunc) FALSE
+# define COMPILE_TYPE(ufunc) debug_break_level > 0 ? CT_DEBUG : CT_NONE
 #endif
 
 /*