diff options
author | Ilia K <ki.stfu@gmail.com> | 2015-05-20 10:15:47 +0000 |
---|---|---|
committer | Ilia K <ki.stfu@gmail.com> | 2015-05-20 10:15:47 +0000 |
commit | 38810f430b7e7b4695b3525edfcdee960c82c779 (patch) | |
tree | 941491d13053e8ca487dc94b74498703e06cc987 /lldb/source/Target/Process.cpp | |
parent | 81496c1dec057780c0076d9a892e11a4248cc203 (diff) | |
download | bcm5719-llvm-38810f430b7e7b4695b3525edfcdee960c82c779.tar.gz bcm5719-llvm-38810f430b7e7b4695b3525edfcdee960c82c779.zip |
Fix handling of hijacked events in synchronous mode
Summary:
This patch includes the following changes:
* Fix Target::Launch to handle hijacked event in synchronous mode
* Improve MiStartupOptionsTestCase tests to expect *stopped (MI)
* Add SBProcess::GetStopEventForStopID
* Add ProcessModID::SetStopEventForLastNaturalStopID/GetStopEventForStopID
* Add const qualifier to ProcessModID::GetLastNaturalStopID
* Add SBProcess::GetStopEventForStopID
* Don't broadcast hijacked event in Target::Launch
* Add CMICmnLLDBDebugger::CheckIfNeedToRebroadcastStopEvent/RebroadcastStopEvent
Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/startup_options/
Reviewers: zturner, jingham, clayborg, abidh
Reviewed By: clayborg
Subscribers: abidh, zturner, lldb-commits, clayborg, jingham
Differential Revision: http://reviews.llvm.org/D9371
llvm-svn: 237781
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 619cd4b956f..d43ce743da9 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1796,6 +1796,7 @@ Process::SetPrivateState (StateType new_state) if (state_changed) { m_private_state.SetValueNoLock (new_state); + EventSP event_sp (new Event (eBroadcastBitStateChanged, new ProcessEventData (shared_from_this(), new_state))); if (StateIsStoppedState(new_state, false)) { // Note, this currently assumes that all threads in the list @@ -1812,15 +1813,18 @@ Process::SetPrivateState (StateType new_state) m_thread_list.DidStop(); m_mod_id.BumpStopID(); + if (!m_mod_id.IsLastResumeForUserExpression()) + m_mod_id.SetStopEventForLastNaturalStopID(event_sp); m_memory_cache.Clear(); if (log) log->Printf("Process::SetPrivateState (%s) stop_id = %u", StateAsCString(new_state), m_mod_id.GetStopID()); } + // Use our target to get a shared pointer to ourselves... if (m_finalize_called && PrivateStateThreadIsValid() == false) - BroadcastEvent (eBroadcastBitStateChanged, new ProcessEventData (shared_from_this(), new_state)); + BroadcastEvent (event_sp); else - m_private_state_broadcaster.BroadcastEvent (eBroadcastBitStateChanged, new ProcessEventData (shared_from_this(), new_state)); + m_private_state_broadcaster.BroadcastEvent (event_sp); } else { |