summaryrefslogtreecommitdiffstats
path: root/src/vim.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-06-13 14:01:26 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-13 14:01:26 +0200
commite99d422bbd3e47620915bf89671673f0711671b4 (patch)
treeda9d46ec8f793ae3f70ddcd229bc4a34122a3170 /src/vim.h
parente6174fd58d459722847c76f8c5aa1b08a49c3e0d (diff)
patch 8.2.2985: Vim9: a compiled function cannot be debuggedv8.2.2985
Problem: Vim9: a compiled function cannot be debugged. Solution: Add initial debugging support.
Diffstat (limited to 'src/vim.h')
-rw-r--r--src/vim.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vim.h b/src/vim.h
index e1e68f9650..784fa3a8c0 100644
--- 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
/*