diff options
| author | Pavel Labath <labath@google.com> | 2016-08-18 12:32:41 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2016-08-18 12:32:41 +0000 |
| commit | 27402d2a12fad5e347879e23eb91ba63778b3360 (patch) | |
| tree | 411a7a375b257968dcbadac3e0df0874a7e70e02 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp | |
| parent | 2fc1985db3ea6f60156d9fb4b969cc05636586c0 (diff) | |
| download | llvm-27402d2a12fad5e347879e23eb91ba63778b3360.zip llvm-27402d2a12fad5e347879e23eb91ba63778b3360.tar.gz llvm-27402d2a12fad5e347879e23eb91ba63778b3360.tar.bz2 | |
Move QSyncThreadState packet generation to the gdb-remote client
llvm-svn: 279057
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp')
| -rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp index dbdb3a8..dd8ac9e 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp @@ -334,28 +334,6 @@ GDBRemoteRegisterContext::SetPrimordialRegister(const RegisterInfo *reg_info, reg_info->byte_size)); } -void -GDBRemoteRegisterContext::SyncThreadState(Process *process) -{ - // NB. We assume our caller has locked the sequence mutex. - - GDBRemoteCommunicationClient &gdb_comm (((ProcessGDBRemote *) process)->GetGDBRemote()); - if (!gdb_comm.GetSyncThreadStateSupported()) - return; - - StreamString packet; - StringExtractorGDBRemote response; - packet.Printf ("QSyncThreadState:%4.4" PRIx64 ";", m_thread.GetProtocolID()); - if (gdb_comm.SendPacketAndWaitForResponse(packet.GetString().c_str(), - packet.GetString().size(), - response, - false) == GDBRemoteCommunication::PacketResult::Success) - { - if (response.IsOKResponse()) - InvalidateAllRegisters(); - } -} - bool GDBRemoteRegisterContext::WriteRegisterBytes (const RegisterInfo *reg_info, DataExtractor &data, uint32_t data_offset) { @@ -562,7 +540,8 @@ GDBRemoteRegisterContext::ReadAllRegisterValues (lldb::DataBufferSP &data_sp) GDBRemoteClientBase::Lock lock(gdb_comm, false); if (lock) { - SyncThreadState(process); + if (gdb_comm.SyncThreadState(m_thread.GetProtocolID())) + InvalidateAllRegisters(); if (use_g_packet && gdb_comm.ReadAllRegisters(m_thread.GetProtocolID(), response)) { |
