diff options
author | Pavel Labath <labath@google.com> | 2016-08-18 14:33:55 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-08-18 14:33:55 +0000 |
commit | 83082a03370bd65a834dc3ba2d81c4996ab22cf4 (patch) | |
tree | 0771d4a795faf794f4a3ea790c947ef2f204d690 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | |
parent | 3780b3a9eb6a51ab2ced55bda20b315d7817221d (diff) | |
download | bcm5719-llvm-83082a03370bd65a834dc3ba2d81c4996ab22cf4.tar.gz bcm5719-llvm-83082a03370bd65a834dc3ba2d81c4996ab22cf4.zip |
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
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index fc0cf6e4f38..00357dd54e3 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<lldb::tid_t> &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 |