From: Pavel Labath Date: Thu, 18 Aug 2016 14:33:55 +0000 (+0000) Subject: gdb-remote: Remove manual locking from GetShlibInfoAddr X-Git-Tag: llvmorg-4.0.0-rc1~12080 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83082a03370bd65a834dc3ba2d81c4996ab22cf4;p=platform%2Fupstream%2Fllvm.git 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. llvm-svn: 279070 --- diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index fc0cf6e..00357dd 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -2998,22 +2998,10 @@ GDBRemoteCommunicationClient::GetCurrentThreadIDs (std::vector &thr 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