[PATCH] D47415: [lldb, lldb-mi] Re-implement MI -exec-continue command.

Alexander Polyakov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 7 13:41:02 PDT 2018


polyakov.alex added inline comments.


================
Comment at: tools/lldb-mi/MICmdCmdExec.cpp:248
     }
-  } else {
-    // ToDo: Re-evaluate if this is required when application near finished as
-    // this is parsing LLDB error message
-    // which seems a hack and is code brittle
-    const char *pLldbErr = m_lldbResult.GetError();
-    const CMIUtilString strLldbMsg(CMIUtilString(pLldbErr).StripCREndOfLine());
-    if (strLldbMsg == "error: Process must be launched.") {
-      CMIDriver::Instance().SetExitApplicationFlag(true);
-    }
-  }
+  } else m_lldbResult.SetError(error.GetCString());
 
----------------
clayborg wrote:
> An error can claim to fail but not have an error string set. It might be nice to have a helper function that checks to make sure there is an error string on error cases and if there is no error string when error.Success() is false or error.Fail() is true, then set the error string to "unknown error". 
This functionality might be useful in all lldb-mi commands. So do you know where to place this function? Maybe inside SBError class?


https://reviews.llvm.org/D47415





More information about the llvm-commits mailing list