private string WaitForResponse(int timeout)
{
var result = string.Empty;
if (responseReceived.Wait(timeout))
{
if (response == "^running")
{
CurrentState = DebuggerState.Running;
}
result = response;
response = string.Empty;
}
else if (DebugMode)
{
console.WriteLine("gdb command timed out.");
}
return result;
}