Index: tools/lldb-mi/MICmdCmdExec.cpp
===================================================================
--- tools/lldb-mi/MICmdCmdExec.cpp	(revision 215349)
+++ tools/lldb-mi/MICmdCmdExec.cpp	(working copy)
@@ -28,6 +28,9 @@
 
 // Third Party Headers:
 #include <lldb/API/SBCommandInterpreter.h>
+#include <lldb/API/SBProcess.h>
+#include <lldb/API/SBStream.h>
+#include "lldb/lldb-enumerations.h"
 
 // In-house headers:
 #include "MICmdCmdExec.h"
@@ -83,20 +86,29 @@
 //--
 bool CMICmdCmdExecRun::Execute( void )
 {
-    const MIchar * pCmd = "run";
     CMICmnLLDBDebugSessionInfo & rSessionInfo( CMICmnLLDBDebugSessionInfo::Instance() );
-    const lldb::ReturnStatus rtn = rSessionInfo.m_rLldbDebugger.GetCommandInterpreter().HandleCommand( pCmd, m_lldbResult ); MIunused( rtn );
-	
-	if( m_lldbResult.GetErrorSize() == 0 )
+    lldb::SBError error;
+    lldb::SBStream errMsg;
+    uint32_t launch_flags = lldb::LaunchFlags::eLaunchFlagDebug;
+    lldb::SBProcess process = rSessionInfo.m_lldbTarget.Launch (rSessionInfo.m_rLlldbListener,
+                nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, launch_flags, false, error);
+
+	if( (!process.IsValid()) || (error.Fail()) )
 	{
-		if( !CMIDriver::Instance().SetDriverStateRunningDebugging() )
-		{
-			const CMIUtilString & rErrMsg( CMIDriver::Instance().GetErrorDescription() );
-			SetError( CMIUtilString::Format( MIRSRC( IDS_CMD_ERR_SET_NEW_DRIVER_STATE ), m_cmdData.strMiCmd.c_str(), rErrMsg.c_str() ) );
-			return MIstatus::failure;
-		}
+		SetError( CMIUtilString::Format( MIRSRC( IDS_CMD_ERR_INVALID_PROCESS ), m_cmdData.strMiCmd.c_str(), errMsg.GetData() ) );
+		return MIstatus::failure;
 	}
 
+	// Save the process in the session info
+	rSessionInfo.m_lldbProcess = process;
+
+	if( !CMIDriver::Instance().SetDriverStateRunningDebugging() )
+	{
+		const CMIUtilString & rErrMsg( CMIDriver::Instance().GetErrorDescription() );
+		SetError( CMIUtilString::Format( MIRSRC( IDS_CMD_ERR_SET_NEW_DRIVER_STATE ), m_cmdData.strMiCmd.c_str(), rErrMsg.c_str() ) );
+		return MIstatus::failure;
+	}
 	 return MIstatus::success;
 }
 
@@ -122,6 +134,19 @@
     {
         const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Running );
         m_miResultRecord = miRecordResult;
+
+    	CMICmnLLDBDebugSessionInfo & rSessionInfo( CMICmnLLDBDebugSessionInfo::Instance() );
+    	lldb::pid_t pid = rSessionInfo.m_lldbProcess.GetProcessID();
+    	// Give the client '=thread-group-started,id="i1" pid="xyz"'
+    	m_bHasResultRecordExtra = true;
+    	const CMICmnMIValueConst miValueConst2( "i1" );
+    	const CMICmnMIValueResult miValueResult2( "id", miValueConst2 );
+    	const CMIUtilString strPid( CMIUtilString::Format( "%lld", pid ) );
+    	const CMICmnMIValueConst miValueConst( strPid );
+    	const CMICmnMIValueResult miValueResult( "pid", miValueConst );
+    	CMICmnMIOutOfBandRecord miOutOfBand( CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupStarted, miValueResult2 );
+    	miOutOfBand.Add( miValueResult );
+    	m_miResultRecordExtra = miOutOfBand.GetString();
     }
 	
 	return MIstatus::success;
