patch 8.1.0091: MS-Windows: Cannot interrupt gdb when program is running

Problem:    MS-Windows: Cannot interrupt gdb when program is running.
Solution:   Add debugbreak() and use it in the terminal debugger.
            Respect 'modified' in a prompt buffer.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 3cb66f3..24c3194 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -123,6 +123,9 @@
 static void f_count(typval_T *argvars, typval_T *rettv);
 static void f_cscope_connection(typval_T *argvars, typval_T *rettv);
 static void f_cursor(typval_T *argsvars, typval_T *rettv);
+#ifdef WIN3264
+static void f_debugbreak(typval_T *argvars, typval_T *rettv);
+#endif
 static void f_deepcopy(typval_T *argvars, typval_T *rettv);
 static void f_delete(typval_T *argvars, typval_T *rettv);
 static void f_deletebufline(typval_T *argvars, typval_T *rettv);
@@ -577,6 +580,9 @@
     {"count",		2, 4, f_count},
     {"cscope_connection",0,3, f_cscope_connection},
     {"cursor",		1, 3, f_cursor},
+#ifdef WIN3264
+    {"debugbreak",	1, 1, f_debugbreak},
+#endif
     {"deepcopy",	1, 2, f_deepcopy},
     {"delete",		1, 2, f_delete},
     {"deletebufline",	2, 3, f_deletebufline},
@@ -2761,6 +2767,33 @@
     rettv->vval.v_number = 0;
 }
 
+#ifdef WIN3264
+/*
+ * "debugbreak()" function
+ */
+    static void
+f_debugbreak(typval_T *argvars, typval_T *rettv)
+{
+    int		pid;
+
+    rettv->vval.v_number = FAIL;
+    pid = (int)get_tv_number(&argvars[0]);
+    if (pid == 0)
+	EMSG(_(e_invarg));
+    else
+    {
+	HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
+
+	if (hProcess != NULL)
+	{
+	    DebugBreakProcess(hProcess);
+	    CloseHandle(hProcess);
+	    rettv->vval.v_number = OK;
+	}
+    }
+}
+#endif
+
 /*
  * "deepcopy()" function
  */