mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
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.
2ed890f1f8
This commit is contained in:
@@ -466,13 +466,18 @@ endfunc
|
|||||||
" Function called when pressing CTRL-C in the prompt buffer and when placing a
|
" Function called when pressing CTRL-C in the prompt buffer and when placing a
|
||||||
" breakpoint.
|
" breakpoint.
|
||||||
func s:PromptInterrupt()
|
func s:PromptInterrupt()
|
||||||
|
" 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
|
if s:pid == 0
|
||||||
echoerr 'Cannot interrupt gdb, did not find a process ID'
|
echoerr 'Cannot interrupt gdb, did not find a process ID'
|
||||||
else
|
else
|
||||||
"call ch_log('Interrupting gdb')
|
|
||||||
" Using job_stop(s:gdbjob, 'int') does not work.
|
|
||||||
call debugbreak(s:pid)
|
call debugbreak(s:pid)
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
call jobstop(s:gdbjob)
|
||||||
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Function called when gdb outputs text.
|
" Function called when gdb outputs text.
|
||||||
|
Reference in New Issue
Block a user