Patch 8.2.3027
Problem: Vim9: breakpoint in compiled function not always checked.
Solution: Check for breakpoint when calling compiled function from compiled
function.
Files: src/vim9execute.c, src/testdir/test_debugger.vim
*** ../vim-8.2.3026/src/vim9execute.c 2021-06-20 19:28:10.273021391 +0200
--- src/vim9execute.c 2021-06-20 19:52:32.521279815 +0200
***************
*** 229,234 ****
--- 229,237 ----
}
#endif
+ // Update uf_has_breakpoint if needed.
+ update_has_breakpoint(ufunc);
+
// When debugging and using "cont" switches to the not-debugged
// instructions, may need to still compile them.
if ((func_needs_compiling(ufunc, COMPILE_TYPE(ufunc))
*** ../vim-8.2.3026/src/testdir/test_debugger.vim 2021-06-20
19:28:10.273021391 +0200
--- src/testdir/test_debugger.vim 2021-06-20 20:06:46.110918432 +0200
***************
*** 940,946 ****
--- 940,961 ----
echo "here"
echo "and"
echo "there"
+ breakadd func 2 LocalFunc
+ LocalFunc()
enddef
+
+ def LocalFunc()
+ echo "first"
+ echo "second"
+ breakadd func 1 LegacyFunc
+ LegacyFunc()
+ enddef
+
+ func LegacyFunc()
+ echo "legone"
+ echo "legtwo"
+ endfunc
+
breakadd func 2 g:SomeFunc
END
call writefile(file, 'XtestDebug.vim')
***************
*** 949,954 ****
--- 964,976 ----
call RunDbgCmd(buf,':call SomeFunc()', ['line 2: echo "and"'])
call RunDbgCmd(buf,'next', ['line 3: echo "there"'])
+ call RunDbgCmd(buf,'next', ['line 4: breakadd func 2 LocalFunc'])
+
+ " continue, next breakpoint is in LocalFunc()
+ call RunDbgCmd(buf,'cont', ['line 2: echo "second"'])
+
+ " continue, next breakpoint is in LegacyFunc()
+ call RunDbgCmd(buf,'cont', ['line 1: echo "legone"'])
call RunDbgCmd(buf, 'cont')
*** ../vim-8.2.3026/src/version.c 2021-06-20 19:28:10.273021391 +0200
--- src/version.c 2021-06-20 19:54:18.072994697 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3027,
/**/
--
Don't Panic!
-- The Hitchhiker's Guide to the Galaxy
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202106201811.15KIB1U9398764%40masaka.moolenaar.net.