Author: labath Date: Thu Aug 18 09:33:55 2016 New Revision: 279070 URL: http://llvm.org/viewvc/llvm-project?rev=279070&view=rev Log: gdb-remote: Remove manual locking from GetShlibInfoAddr
The function can simply call the non-NoLock version of the SendPacket function and let it do the locking. Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=279070&r1=279069&r2=279070&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Thu Aug 18 09:33:55 2016 @@ -2998,22 +2998,10 @@ GDBRemoteCommunicationClient::GetCurrent lldb::addr_t GDBRemoteCommunicationClient::GetShlibInfoAddr() { - Lock lock(*this, false); - if (lock) - { - StringExtractorGDBRemote response; - if (SendPacketAndWaitForResponse("qShlibInfoAddr", ::strlen ("qShlibInfoAddr"), response, false) == PacketResult::Success) - { - if (response.IsNormalResponse()) - return response.GetHexMaxU64(false, LLDB_INVALID_ADDRESS); - } - } - else if (Log *log = ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet(GDBR_LOG_PROCESS | GDBR_LOG_PACKETS)) - { - log->Printf("GDBRemoteCommunicationClient::%s: Didn't get sequence mutex for qShlibInfoAddr packet.", - __FUNCTION__); - } - return LLDB_INVALID_ADDRESS; + StringExtractorGDBRemote response; + if (SendPacketAndWaitForResponse("qShlibInfoAddr", response, false) != PacketResult::Success || !response.IsNormalResponse()) + return LLDB_INVALID_ADDRESS; + return response.GetHexMaxU64(false, LLDB_INVALID_ADDRESS); } lldb_private::Error _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits