summaryrefslogtreecommitdiffstats
path: root/runtime/pack
diff options
context:
space:
mode:
authoriam28th <artyom28th@gmail.com>2023-12-14 20:30:26 +0100
committerChristian Brabandt <cb@256bit.org>2023-12-14 20:33:43 +0100
commit323dda1484d95ee5c8a1b2205f8c495446df75ee (patch)
tree3ae846b682476cb8975a137936bb5642ad187ca1 /runtime/pack
parent74da0ee0a24799a312a3a8a65858237185ef7a23 (diff)
runtime(termdebug): add Tbreak command
closes: #13656 Signed-off-by: iam28th <artyom28th@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/pack')
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index e764c2353a..1dce91b508 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -953,6 +953,7 @@ func s:InstallCommands()
set cpo&vim
command -nargs=? Break call s:SetBreakpoint(<q-args>)
+ command -nargs=? Tbreak call s:SetBreakpoint(<q-args>, v:true)
command Clear call s:ClearBreakpoint()
command Step call s:SendResumingCommand('-exec-step')
command Over call s:SendResumingCommand('-exec-next')
@@ -1067,6 +1068,7 @@ endfunc
" Delete installed debugger commands in the current window.
func s:DeleteCommands()
delcommand Break
+ delcommand Tbreak
delcommand Clear
delcommand Step
delcommand Over
@@ -1167,7 +1169,7 @@ func s:Until(at)
endfunc
" :Break - Set a breakpoint at the cursor position.
-func s:SetBreakpoint(at)
+func s:SetBreakpoint(at, tbreak=v:false)
" Setting a breakpoint may not work while the program is running.
" Interrupt to make it work.
let do_continue = 0
@@ -1180,7 +1182,12 @@ func s:SetBreakpoint(at)
" Use the fname:lnum format, older gdb can't handle --source.
let at = empty(a:at) ?
\ fnameescape(expand('%:p')) . ':' . line('.') : a:at
- call s:SendCommand('-break-insert ' . at)
+ if a:tbreak
+ let cmd = '-break-insert -t ' . at
+ else
+ let cmd = '-break-insert ' . at
+ endif
+ call s:SendCommand(cmd)
if do_continue
Continue
endif