[PATCH] D47838: [lldb-mi] Re-implement MI -exec-step command.
Greg Clayton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 11 08:28:56 PDT 2018
clayborg added inline comments.
================
Comment at: lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp:505-509
+ if (error.Success())
+ return MIstatus::success;
+
+ SetError(error.GetCString());
+ return MIstatus::failure;
----------------
Utility funciton for these last four line? I mentioned it in another review:
```
MIstatus ReturnMIStatus(lldb::SBError &error) {
if (error.Success())
return MIstatus::success;
SetError(error.GetCString());
return MIstatus::failure;
}
```
================
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);
----------------
How does this code handle the error case for stepping now?
Repository:
rL LLVM
https://reviews.llvm.org/D47838
More information about the llvm-commits
mailing list