Reimplemented DebugBreakProcess.
diff --git a/server/debugger.c b/server/debugger.c
index 42d7362..60e406b 100644
--- a/server/debugger.c
+++ b/server/debugger.c
@@ -5,6 +5,7 @@
*/
#include <assert.h>
+#include <signal.h>
#include <string.h>
#include <stdio.h>
@@ -698,6 +699,32 @@
generate_debug_event( current, OUTPUT_DEBUG_STRING_EVENT, &data );
}
+/* simulate a breakpoint in a process */
+DECL_HANDLER(debug_break)
+{
+ struct process *process;
+
+ reply->self = 0;
+ if (!(process = get_process_from_handle( req->handle, PROCESS_SET_INFORMATION /*FIXME*/ )))
+ return;
+ if (process != current->process)
+ {
+ /* find a suitable thread to signal */
+ struct thread *thread;
+ for (thread = process->thread_list; thread; thread = thread->proc_next)
+ {
+ if (thread->unix_pid)
+ {
+ kill( thread->unix_pid, SIGTRAP );
+ break;
+ }
+ }
+ if (!thread) set_error( STATUS_ACCESS_DENIED );
+ }
+ else reply->self = 1;
+ release_object( process );
+}
+
/* set debugger kill on exit flag */
DECL_HANDLER(set_debugger_kill_on_exit)
{