Patch 8.2.3027

5 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 20, 2021, 2:11:06 PM6/20/21
to vim...@googlegroups.com

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 -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages