server: Debugging our own process is disallowed.
diff --git a/server/debugger.c b/server/debugger.c
index 727f3be..533347c 100644
--- a/server/debugger.c
+++ b/server/debugger.c
@@ -421,6 +421,7 @@
static int debugger_attach( struct process *process, struct thread *debugger )
{
if (process->debugger) goto error; /* already being debugged */
+ if (debugger->process == process) goto error;
if (!is_process_init_done( process )) goto error; /* still starting up */
if (list_empty( &process->thread_list )) goto error; /* no thread running in the process */