summaryrefslogtreecommitdiffstats
path: root/src/vim9.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-06-13 15:16:01 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-13 15:16:01 +0200
commitc3a27bbd53a4653c2d8122a047a4cf2cfc52ed21 (patch)
tree8ee330a78cb0694dbbd4b5e3e001b1d820345c03 /src/vim9.h
parent6d1792d4085c9905c9da6ff27065b57cb7cddc57 (diff)
patch 8.2.2988: Vim9: debugger test failsv8.2.2988
Problem: Vim9: debugger test fails. Solution: Get the debugger instructions when needed.
Diffstat (limited to 'src/vim9.h')
-rw-r--r--src/vim9.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/vim9.h b/src/vim9.h
index f434602d2b..dd390716b5 100644
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -493,10 +493,17 @@ extern garray_T def_functions;
// Used for "lnum" when a range is to be taken from the stack and "!" is used.
#define LNUM_VARIABLE_RANGE_ABOVE -888
+// Keep in sync with COMPILE_TYPE()
#ifdef FEAT_PROFILE
# define INSTRUCTIONS(dfunc) \
- ((do_profiling == PROF_YES && (dfunc->df_ufunc)->uf_profiling) \
- ? (dfunc)->df_instr_prof : (dfunc)->df_instr)
+ (debug_break_level > 0 \
+ ? (dfunc)->df_instr_debug \
+ : ((do_profiling == PROF_YES && (dfunc->df_ufunc)->uf_profiling) \
+ ? (dfunc)->df_instr_prof \
+ : (dfunc)->df_instr))
#else
-# define INSTRUCTIONS(dfunc) ((dfunc)->df_instr)
+# define INSTRUCTIONS(dfunc) \
+ (debug_break_level > 0 \
+ ? (dfunc)->df_instr_debug \
+ : (dfunc)->df_instr)
#endif