]> granicus.if.org Git - vim/commitdiff
patch 8.2.2988: Vim9: debugger test fails v8.2.2988
authorBram Moolenaar <Bram@vim.org>
Sun, 13 Jun 2021 13:16:01 +0000 (15:16 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 13 Jun 2021 13:16:01 +0000 (15:16 +0200)
Problem:    Vim9: debugger test fails.
Solution:   Get the debugger instructions when needed.

src/version.c
src/vim.h
src/vim9.h

index 2800cf4a337488be572901a873e732be72eb82ec..61a5f0d5c2ba21a0cacfe473b19a65c07390df61 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2988,
 /**/
     2987,
 /**/
index 784fa3a8c0d3c52b7683b9732e006bfe1a74e3e3..05af5a188283cf3a95d7b330e0be082a703c8e30 100644 (file)
--- 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
index f434602d2b6400aa972cf2e0b85e0dcd4e4705e2..dd390716b5dd4b7ea34b4137cb6f9a0a4f89b478 100644 (file)
@@ -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