KLapshin added inline comments.

================
Comment at: tools/lldb-mi/MICmdCmdExec.cpp:92
@@ +91,3 @@
+        const char *pCmd = bProcessMustStopAtEntry ? "process launch -s" : 
"process launch";
+        const lldb::ReturnStatus rtn = 
rSessionInfo.GetDebugger().GetCommandInterpreter().HandleCommand(pCmd, 
m_lldbResult);
+        MIunused(rtn);
----------------
enlight wrote:
> The process should be launched through the SB API, not the command 
> interpreter. I'm not very familiar with the SB API but I'd try using the 
> **lldb::eLaunchFlagStopAtEntry** flag with **SBLaunchInfo::SetLaunchFlags()**.
You are right, no doubt - this is clear what Target and Process API direct 
usage is faster and straightforward manner.

Just couple words regarding why interpreter used instead here - patch was 
prepared at moment when lldb-MI had lack synchronization (via Listener) with 
lldb Core, so setting corresponding flag gave random results - app may stop or 
not. Via interpreter it worked fine always - that's why I stated "more 
reliable" in review header.

I will check if flag pass is enough currently - this will make patch shorter 
and clearer.


Repository:
  rL LLVM

http://reviews.llvm.org/D12977



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to