1
0
forked from aniani/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.
This commit is contained in:
Bram Moolenaar
2018-06-21 20:31:14 +02:00
parent 71ef1ba5e9
commit 2ed890f1f8
2 changed files with 12 additions and 5 deletions

View File

@@ -402,12 +402,17 @@ 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()
if s:pid == 0 call ch_log('Interrupting gdb')
echoerr 'Cannot interrupt gdb, did not find a process ID' 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 else
call ch_log('Interrupting gdb') call job_stop(s:gdbjob, 'int')
" Using job_stop(s:gdbjob, 'int') does not work.
call debugbreak(s:pid)
endif endif
endfunc endfunc

View File

@@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
93,
/**/ /**/
92, 92,
/**/ /**/