Mercurial > vim
comparison src/testdir/test_debugger.vim @ 24980:2cb78583fada v8.2.3027
patch 8.2.3027: Vim9: breakpoint in compiled function not always checked
Commit: https://github.com/vim/vim/commit/2ac4b2536a40e5cd75b4ff7a3d44a282d2f4f008
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 20 20:09:42 2021 +0200
patch 8.2.3027: Vim9: breakpoint in compiled function not always checked
Problem: Vim9: breakpoint in compiled function not always checked.
Solution: Check for breakpoint when calling compiled function from compiled
function.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 20 Jun 2021 20:15:02 +0200 |
parents | 2818b8108d92 |
children | 70f55a30f03c |
comparison
equal
deleted
inserted
replaced
24979:6ed6f1eef437 | 24980:2cb78583fada |
---|---|
938 vim9script | 938 vim9script |
939 def g:SomeFunc() | 939 def g:SomeFunc() |
940 echo "here" | 940 echo "here" |
941 echo "and" | 941 echo "and" |
942 echo "there" | 942 echo "there" |
943 breakadd func 2 LocalFunc | |
944 LocalFunc() | |
943 enddef | 945 enddef |
946 | |
947 def LocalFunc() | |
948 echo "first" | |
949 echo "second" | |
950 breakadd func 1 LegacyFunc | |
951 LegacyFunc() | |
952 enddef | |
953 | |
954 func LegacyFunc() | |
955 echo "legone" | |
956 echo "legtwo" | |
957 endfunc | |
958 | |
944 breakadd func 2 g:SomeFunc | 959 breakadd func 2 g:SomeFunc |
945 END | 960 END |
946 call writefile(file, 'XtestDebug.vim') | 961 call writefile(file, 'XtestDebug.vim') |
947 | 962 |
948 let buf = RunVimInTerminal('-S XtestDebug.vim', {}) | 963 let buf = RunVimInTerminal('-S XtestDebug.vim', {}) |
949 | 964 |
950 call RunDbgCmd(buf,':call SomeFunc()', ['line 2: echo "and"']) | 965 call RunDbgCmd(buf,':call SomeFunc()', ['line 2: echo "and"']) |
951 call RunDbgCmd(buf,'next', ['line 3: echo "there"']) | 966 call RunDbgCmd(buf,'next', ['line 3: echo "there"']) |
967 call RunDbgCmd(buf,'next', ['line 4: breakadd func 2 LocalFunc']) | |
968 | |
969 " continue, next breakpoint is in LocalFunc() | |
970 call RunDbgCmd(buf,'cont', ['line 2: echo "second"']) | |
971 | |
972 " continue, next breakpoint is in LegacyFunc() | |
973 call RunDbgCmd(buf,'cont', ['line 1: echo "legone"']) | |
952 | 974 |
953 call RunDbgCmd(buf, 'cont') | 975 call RunDbgCmd(buf, 'cont') |
954 | 976 |
955 call StopVimInTerminal(buf) | 977 call StopVimInTerminal(buf) |
956 call delete('Xtest1.vim') | 978 call delete('Xtest1.vim') |