No functionality changes, mostly cleanup.

Cleaned up the Mutex::Locker and the ReadWriteLock classes a bit.

Also cleaned up the GDBRemoteCommunication class to not have so many packet functions. Used the "NoLock" versions of send/receive packet functions when possible for a bit of performance.

llvm-svn: 154458
This commit is contained in:
Greg Clayton
2012-04-11 00:24:49 +00:00
parent ad66de155b
commit 37a0a24a5f
22 changed files with 151 additions and 145 deletions

View File

@@ -1621,10 +1621,10 @@ ProcessGDBRemote::DoDetach()
m_thread_list.DiscardThreadPlans();
size_t response_size = m_gdb_comm.SendPacket ("D", 1);
bool success = m_gdb_comm.Detach ();
if (log)
{
if (response_size)
if (success)
log->PutCString ("ProcessGDBRemote::DoDetach() detach packet sent successfully");
else
log->PutCString ("ProcessGDBRemote::DoDetach() detach packet send failed");
@@ -1691,16 +1691,7 @@ ProcessGDBRemote::IsAlive ()
addr_t
ProcessGDBRemote::GetImageInfoAddress()
{
if (!m_gdb_comm.IsRunning())
{
StringExtractorGDBRemote response;
if (m_gdb_comm.SendPacketAndWaitForResponse("qShlibInfoAddr", ::strlen ("qShlibInfoAddr"), response, false))
{
if (response.IsNormalResponse())
return response.GetHexMaxU64(false, LLDB_INVALID_ADDRESS);
}
}
return LLDB_INVALID_ADDRESS;
return m_gdb_comm.GetShlibInfoAddr();
}
//------------------------------------------------------------------