static PETHREAD GspDbgThread;
static PETHREAD GspEnumThread;
+static FAST_MUTEX GspLock;
+
extern LIST_ENTRY PsActiveProcessHead;
KD_PORT_INFORMATION GdbPortInfo = { 2, 115200, 0 }; /* FIXME hardcoded for COM2, 115200 baud */
}
else
{
+ /* Can only debug 1 thread at a time... */
+ ExAcquireFastMutex(&GspLock);
+
/* Make sure we're debugging the current thread. */
if (NULL != GspDbgThread)
{
GspDbgThread = NULL;
}
+ ExReleaseFastMutex(&GspLock);
return kdContinue;
break;
}
if (BootPhase == 0)
{
+ ExInitializeFastMutex(&GspLock);
+
/* Write out the functions that we support for now */
WrapperTable->KdpInitRoutine = KdpGdbStubInit;
WrapperTable->KdpPrintRoutine = KdpGdbDebugPrint;