polyakov.alex added inline comments.

================
Comment at: lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp:524
 bool CMICmdCmdExecStep::Acknowledge() {
-  if (m_lldbResult.GetErrorSize() > 0) {
-    const char *pLldbErr = m_lldbResult.GetError();
-    MIunused(pLldbErr);
-    const CMICmnMIValueConst miValueConst(m_lldbResult.GetError());
-    const CMICmnMIValueResult miValueResult("message", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-  } else {
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Running);
-    m_miResultRecord = miRecordResult;
-  }
-
+  m_miResultRecord = CMICmnMIResultRecord(
+      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Running);
----------------
clayborg wrote:
> How does this code handle the error case for stepping now?
If there is an error in lldb-mi command execution, it'll be detected in 
`Execute` function:
```
if (error.Success())
  return MIstatus::sucess;

SetError(error.GetCString());
return MIstatus::failure
```

If `Execute` function returns `MIstatus::failure`, then `Acknowledge` function 
won't be called.


Repository:
  rL LLVM

https://reviews.llvm.org/D47838



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

Reply via email to