summaryrefslogtreecommitdiffstats
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
parent6d1792d4085c9905c9da6ff27065b57cb7cddc57 (diff)
patch 8.2.2988: Vim9: debugger test failsv8.2.2988
Problem: Vim9: debugger test fails. Solution: Get the debugger instructions when needed.
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h1
-rw-r--r--src/vim9.h13
3 files changed, 13 insertions, 3 deletions
diff --git a/src/version.c b/src/version.c
index 2800cf4a33..61a5f0d5c2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2988,
+/**/
2987,
/**/
2986,
diff --git a/src/vim.h b/src/vim.h
index 784fa3a8c0..05af5a1882 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1801,6 +1801,7 @@ typedef enum {
CT_DEBUG // use df_instr_debug, overrules CT_PROFILE
} compiletype_T;
+// Keep in sync with INSTRUCTIONS().
#ifdef FEAT_PROFILE
# define COMPILE_TYPE(ufunc) (debug_break_level > 0 ? CT_DEBUG : do_profiling == PROF_YES && (ufunc)->uf_profiling ? CT_PROFILE : CT_NONE)
#else
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