diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-07-04 11:38:50 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-07-04 12:10:04 -0400 |
commit | 10c563577cc11b0af4c465a68f17b0a8976631f8 (patch) | |
tree | 14c39d72271c9e9e85057104215b55f9cd36af53 | |
parent | 37bc089fb9953bf4a82a8a6eaf60fb2f6cea0784 (diff) | |
download | rneovim-10c563577cc11b0af4c465a68f17b0a8976631f8.tar.gz rneovim-10c563577cc11b0af4c465a68f17b0a8976631f8.tar.bz2 rneovim-10c563577cc11b0af4c465a68f17b0a8976631f8.zip |
vim-patch:8.1.0093: non-MS-Windows: Cannot interrupt gdb when program is running
Problem: non-MS-Windows: Cannot interrupt gdb when program is running.
Solution: Only use debugbreak() on MS-Windows.
https://github.com/vim/vim/commit/2ed890f1f810f977ec6a235efd8bf58adddcd0e7
-rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 2898bd991b..6870bcec75 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -466,12 +466,17 @@ endfunc " Function called when pressing CTRL-C in the prompt buffer and when placing a " breakpoint. func s:PromptInterrupt() - if s:pid == 0 - echoerr 'Cannot interrupt gdb, did not find a process ID' + " call ch_log('Interrupting gdb') + if has('win32') + " Using job_stop() does not work on MS-Windows, need to send SIGTRAP to + " the debugger program so that gdb responds again. + if s:pid == 0 + echoerr 'Cannot interrupt gdb, did not find a process ID' + else + call debugbreak(s:pid) + endif else - "call ch_log('Interrupting gdb') - " Using job_stop(s:gdbjob, 'int') does not work. - call debugbreak(s:pid) + call jobstop(s:gdbjob) endif endfunc |