diff options
author | Jim Ingham <jingham@apple.com> | 2010-11-17 02:32:00 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2010-11-17 02:32:00 +0000 |
commit | 0d8bcc79f436d21a79b3e0e92287e51e00540ba5 (patch) | |
tree | dfc84faaed0b50edc6745f9abeb6e67fbd43e7b5 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | |
parent | 9f49b37f25d0b0ebeaf711fcd013b4285e43610d (diff) | |
download | bcm5719-llvm-0d8bcc79f436d21a79b3e0e92287e51e00540ba5.tar.gz bcm5719-llvm-0d8bcc79f436d21a79b3e0e92287e51e00540ba5.zip |
Added an "Interrupted" bit to the ProcessEventData. Halt now generates an event
with the Interrupted bit set. Process::HandlePrivateEvent ignores Interrupted events.
DoHalt is changed to ensure that the stop even is processed, and an event with
the Interrupted event is posted. Finally ClangFunction is rationalized to use this
facility so the that Halt is handled more deterministically.
llvm-svn: 119453
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index 50a7aec4c17..ee03424e528 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -199,14 +199,14 @@ GDBRemoteCommunication::SendContinuePacketAndWaitForResponse log->Printf ("GDBRemoteCommunication::%s ()", __FUNCTION__); Mutex::Locker locker(m_sequence_mutex); - m_is_running.SetValue (true, eBroadcastNever); - // ScopedValueChanger<bool> restore_running_to_false (m_is_running, false); StateType state = eStateRunning; if (SendPacket(payload, packet_length) == 0) state = eStateInvalid; + m_is_running.SetValue (true, eBroadcastAlways); + while (state == eStateRunning) { log = ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS); @@ -856,3 +856,19 @@ GDBRemoteCommunication::DeallocateMemory (addr_t addr, uint32_t timeout_seconds) } return false; } + +bool +GDBRemoteCommunication::WaitForIsRunning (uint32_t timeout_sec) +{ + TimeValue timeout; + if (timeout_sec) + { + timeout = TimeValue::Now(); + timeout.OffsetWithSeconds (timeout_sec); + } + bool timed_out = false; + m_is_running.WaitForValueEqualTo (true, &timeout, &timed_out); + return timed_out; +} + + |