Add extra check that target was stopped before the *stopped is sent.
authorIlia K <ki.stfu@gmail.com>
Wed, 11 Feb 2015 11:24:20 +0000 (11:24 +0000)
committerIlia K <ki.stfu@gmail.com>
Wed, 11 Feb 2015 11:24:20 +0000 (11:24 +0000)
This patch fixes r228417. It's required because eStateCrushed case wasn't investigated.

llvm-svn: 228824

lldb/source/Target/Process.cpp

index 2390c04..c4eccfc 100644 (file)
@@ -3136,7 +3136,7 @@ Process::Launch (ProcessLaunchInfo &launch_info)
 
                         // Target was stopped at entry as was intended. Need to notify the listeners
                         // about it.
-                        if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == true)
+                        if (state == eStateStopped && launch_info.GetFlags().Test(eLaunchFlagStopAtEntry))
                             HandlePrivateEvent(event_sp);
                     }
                     else if (state == eStateExited)