[Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

Kirill Lapshin via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 21 11:04:09 PDT 2015


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);
----------------
KLapshin wrote:
> 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.
Also - in many other places lldb-MI still use interpreter for cmds.


Repository:
  rL LLVM

http://reviews.llvm.org/D12977





More information about the lldb-commits mailing list