diff options
| author | Pavel Labath <labath@google.com> | 2016-07-29 15:41:52 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2016-07-29 15:41:52 +0000 |
| commit | 4cb699260c25d44d84029e2a3a8f37e97b44820f (patch) | |
| tree | 62bb22e59b1dec16b30902532b234728749f7103 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp | |
| parent | 0702c4e86eb61dc2db22bb51525fb2edb008af4d (diff) | |
| download | llvm-4cb699260c25d44d84029e2a3a8f37e97b44820f.zip llvm-4cb699260c25d44d84029e2a3a8f37e97b44820f.tar.gz llvm-4cb699260c25d44d84029e2a3a8f37e97b44820f.tar.bz2 | |
Revert "Rewrite gdb-remote's SendContinuePacketAndWaitForResponse"
This reverts commit r277139, because:
- broken unittest on windows (likely typo on my part)
- seems to break TestCallThatRestart (needs investigation)
llvm-svn: 277154
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp')
| -rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp index c18d308e..628efd9 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp @@ -372,6 +372,12 @@ GDBRemoteRegisterContext::WriteRegisterBytes (const RegisterInfo *reg_info, Data return false; GDBRemoteCommunicationClient &gdb_comm (((ProcessGDBRemote *)process)->GetGDBRemote()); +// FIXME: This check isn't right because IsRunning checks the Public state, but this +// is work you need to do - for instance in ShouldStop & friends - before the public +// state has been changed. +// if (gdb_comm.IsRunning()) +// return false; + #if defined (LLDB_CONFIGURATION_DEBUG) assert (m_reg_data.GetByteSize() >= reg_info->byte_offset + reg_info->byte_size); @@ -395,8 +401,8 @@ GDBRemoteRegisterContext::WriteRegisterBytes (const RegisterInfo *reg_info, Data reg_info->byte_size, // dst length m_reg_data.GetByteOrder())) // dst byte order { - GDBRemoteClientBase::Lock lock(gdb_comm, false); - if (lock) + std::unique_lock<std::recursive_mutex> lock; + if (gdb_comm.GetSequenceMutex(lock, "Didn't get sequence mutex for write register.")) { const bool thread_suffix_supported = gdb_comm.GetThreadSuffixSupported(); ProcessSP process_sp (m_thread.GetProcess()); @@ -564,8 +570,8 @@ GDBRemoteRegisterContext::ReadAllRegisterValues (lldb::DataBufferSP &data_sp) const bool use_g_packet = gdb_comm.AvoidGPackets ((ProcessGDBRemote *)process) == false; - GDBRemoteClientBase::Lock lock(gdb_comm, false); - if (lock) + std::unique_lock<std::recursive_mutex> lock; + if (gdb_comm.GetSequenceMutex(lock, "Didn't get sequence mutex for read all registers.")) { SyncThreadState(process); @@ -673,8 +679,8 @@ GDBRemoteRegisterContext::WriteAllRegisterValues (const lldb::DataBufferSP &data const bool use_g_packet = gdb_comm.AvoidGPackets ((ProcessGDBRemote *)process) == false; StringExtractorGDBRemote response; - GDBRemoteClientBase::Lock lock(gdb_comm, false); - if (lock) + std::unique_lock<std::recursive_mutex> lock; + if (gdb_comm.GetSequenceMutex(lock, "Didn't get sequence mutex for write all registers.")) { const bool thread_suffix_supported = gdb_comm.GetThreadSuffixSupported(); ProcessSP process_sp (m_thread.GetProcess()); |
