Fixed the SendInterrupt logic to return the true if the target was halted

(regardless if the interrupt was sent), and false of not.

llvm-svn: 124766
This commit is contained in:
Greg Clayton 2011-02-03 01:07:45 +00:00
parent dca2917e25
commit aae6e9a6fd
1 changed files with 14 additions and 6 deletions

View File

@ -533,23 +533,31 @@ GDBRemoteCommunication::SendInterrupt
sent_interrupt = true;
if (seconds_to_wait_for_stop)
{
m_private_is_running.WaitForValueEqualTo (false, &timeout, &timed_out);
if (log)
log->Printf ("GDBRemoteCommunication::%s () - sent interrupt, private state stopped", __FUNCTION__);
if (m_private_is_running.WaitForValueEqualTo (false, &timeout, &timed_out))
{
if (log)
log->Printf ("GDBRemoteCommunication::%s () - sent interrupt, private state stopped", __FUNCTION__);
return true;
}
else
{
if (log)
log->Printf ("GDBRemoteCommunication::%s () - sent interrupt, timed out wating for async thread resume", __FUNCTION__);
}
}
else
{
if (log)
log->Printf ("GDBRemoteCommunication::%s () - sent interrupt, not waiting for stop...", __FUNCTION__);
return true;
}
return true;
}
else
{
if (log)
log->Printf ("GDBRemoteCommunication::%s () - failed to write interrupt", __FUNCTION__);
}
return false;
}
else
{
@ -557,7 +565,7 @@ GDBRemoteCommunication::SendInterrupt
log->Printf ("GDBRemoteCommunication::%s () - got sequence mutex without having to interrupt", __FUNCTION__);
}
}
return false;
return true;
}
bool