From 6af632f93c0cfc6138160c807f505d3c1dce2b8f Mon Sep 17 00:00:00 2001 From: Ilia K Date: Fri, 6 Feb 2015 18:15:05 +0000 Subject: Fix a missing "*stopped" notification in LLDB-MI after "process launch -s" in case of remote-macosx Summary: This patch fixes *stopped notification for remote target when started with eLaunchFlagStopAtEntry (for example, using "process launch -s"). See explanation below: ``` Target::Launch (ProcessLaunchInfo &launch_info, Stream *stream) { ... if (state != eStateConnected && platform_sp && platform_sp->CanDebugProcess ()) { ... } else { ... if (m_process_sp) error = m_process_sp->Launch (launch_info); } if (error.Success()) { if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == false) { .... } -- missing event if eLaunchFlagStopAtEntry is set -- m_process_sp->RestoreProcessEvents (); } ... return error ``` Also this patch contains tests and you can check how it works. Reviewers: zturner, clayborg, abidh Reviewed By: clayborg Subscribers: clayborg, abidh, zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D7273 llvm-svn: 228417 --- lldb/source/Target/Process.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lldb/source/Target/Process.cpp') diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 50d2b5afcf6..7f032686725 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -3121,6 +3121,11 @@ Process::Launch (ProcessLaunchInfo &launch_info) StartPrivateStateThread (); m_stop_info_override_callback = GetTarget().GetArchitecture().GetStopInfoOverrideCallback(); + + // Target was stopped at entry as was intended. Need to notify the listeners + // about it. + if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == true) + HandlePrivateEvent(event_sp); } else if (state == eStateExited) { -- cgit v1.2.3